v1.16.1 — AGENTIC_NO_PROGRESS message enrichment (R2 close)#57
Conversation
Closes v1.14.4-cycle followup R2. /6step verdict PARTIAL TP — wire format correctly preserves structuredContent + isError on tool error responses (verified at registry.ts:104-121, server.ts:196-204, MCP SDK CallToolResultSchema with independent optional fields). The "loss" operators saw on 2026-04-29 + 2026-04-30 was consumer-side rendering (Claude Code displays message-only on isError); not actionable from our side. Workaround we control: mirror operator-actionable fields (iterations, filesRead) into the AGENTIC_NO_PROGRESS message string so they're visible regardless of consumer rendering. structuredContent payload stays intact. Format: "...repeated N times without new file reads between repeats (after K iter, X files read). Returning partial state." Other error paths already have relevant context in the message; NO_PROGRESS was the only one light on triage data. Coverage: 759 pass | 9 skipped (no count change — regex-based pin assertions added to existing test). No API/schema/code change beyond the one message-format string + 2 test assertions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR bumps the package to v1.16.1 and enriches the ask_agentic AGENTIC_NO_PROGRESS error message so that iteration/file-read context remains visible even in MCP consumers that only render the message string for isError results.
Changes:
- Enrich
AGENTIC_NO_PROGRESSerror message with(after <iterations> iter(s), <filesRead> file(s) read)inask_agentic. - Update the existing unit test to assert the enriched message includes iterations + files-read counts.
- Bump versions to
1.16.1and add a1.16.1changelog entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/tools/ask-agentic.tool.ts |
Adds iterations/files-read counts to the NO_PROGRESS error string. |
test/unit/ask-agentic.test.ts |
Pins enriched NO_PROGRESS message contents via regex assertions. |
CHANGELOG.md |
Documents the v1.16.1 message enrichment and rationale. |
package.json |
Version bump to 1.16.1. |
server.json |
Version bump to 1.16.1 in server manifest + package entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // structuredContent payload stays intact for any consumer that reads it. | ||
| return errorResult( | ||
| `ask_agentic: no-progress loop detected — call '${sig.slice(0, 200)}' was repeated ${count} times without new file reads between repeats. Returning partial state.`, | ||
| `ask_agentic: no-progress loop detected — call '${sig.slice(0, 200)}' was repeated ${count} times without new file reads between repeats (after ${iterations} iter${iterations === 1 ? '' : 's'}, ${filesReadSet.size} file${filesReadSet.size === 1 ? '' : 's'} read). Returning partial state.`, |
There was a problem hiding this comment.
The error message format here pluralizes "iter" to "iters" (and "file" to "files"), but the PR description / changelog describe the canonical shape as "(after N iter, X files read)". If consumers/operators are expected to rely on a stable substring, consider either keeping "iter" unpluralized (and/or "files read" always) or updating the release notes/tests to match the actual emitted string.
| > `ask_agentic: no-progress loop detected — call '${sig}' was repeated ${count} times without new file reads between repeats. Returning partial state.` | ||
|
|
||
| **After** (v1.16.1): | ||
| > `ask_agentic: no-progress loop detected — call '${sig}' was repeated ${count} times without new file reads between repeats (after ${iterations} iter, ${filesRead} files read). Returning partial state.` |
There was a problem hiding this comment.
The "After" example message here doesn’t exactly match the implementation: the code emits "iter"/"iters" and "file"/"files" with pluralization and includes the trailing "s" for iterations > 1. Consider updating this example to mirror the real string shape so the changelog doesn’t mislead operators who grep for exact text.
| > `ask_agentic: no-progress loop detected — call '${sig}' was repeated ${count} times without new file reads between repeats (after ${iterations} iter, ${filesRead} files read). Returning partial state.` | |
| > `ask_agentic: no-progress loop detected — call '${sig}' was repeated ${count} times without new file reads between repeats (after ${iterations} iter${iterations === 1 ? '' : 's'}, ${filesRead} file${filesRead === 1 ? '' : 's'} read). Returning partial state.` |
| expect(errorMessage).toMatch(/after \d+ iter/); | ||
| expect(errorMessage).toMatch(/\d+ files? read/); |
There was a problem hiding this comment.
The comment says the canonical substring is "(after N iter, X files read)", but the current assertions don’t actually pin that combined shape (they don’t require parentheses/comma ordering, and they allow "iters"). Consider tightening the match so the test enforces the exact canonical substring that the comment describes (or adjust the comment to reflect what’s actually being pinned).
| expect(errorMessage).toMatch(/after \d+ iter/); | |
| expect(errorMessage).toMatch(/\d+ files? read/); | |
| expect(errorMessage).toMatch(/\(after \d+ iter, \d+ files? read\)/); |
Summary
Closes v1.14.4-cycle followup R2.
/6stepverdict: PARTIAL TP — wire format correctly preserves bothstructuredContentandisError(verified empirically). The "structuredContent dropped on error" symptom operators reported is consumer-side rendering (Claude Code displays message-only on isError), not our bug.Workaround we control: enrich the
AGENTIC_NO_PROGRESSmessage string withiterations+filesReadso they're visible regardless of consumer rendering.structuredContentpayload stays intact for any consumer that reads it.Format change:
... was repeated N times without new file reads between repeats. Returning partial state.... was repeated N times without new file reads between repeats (after K iter, X files read). Returning partial state.Other error paths already had relevant context; only NO_PROGRESS was light on triage data.
Scope
Testing
759 passed | 9 skipped (no count change — added regex-based pin assertions to existing test).
Pre-publish audit: clean.
Unit tests added/updated
npm run lintpassesnpm run typecheckpassesnpm run testpassesBackwards compatibility
structuredContentfields completely unchanged.🤖 Generated with Claude Code