Skip to content

v1.16.1 — AGENTIC_NO_PROGRESS message enrichment (R2 close)#57

Merged
qmt merged 1 commit into
mainfrom
v1.16.1-r2-message-enrichment
Apr 30, 2026
Merged

v1.16.1 — AGENTIC_NO_PROGRESS message enrichment (R2 close)#57
qmt merged 1 commit into
mainfrom
v1.16.1-r2-message-enrichment

Conversation

@qmt
Copy link
Copy Markdown
Member

@qmt qmt commented Apr 30, 2026

Summary

Closes v1.14.4-cycle followup R2. /6step verdict: PARTIAL TP — wire format correctly preserves both structuredContent and isError (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_PROGRESS message string with iterations + filesRead so they're visible regardless of consumer rendering. structuredContent payload stays intact for any consumer that reads it.

Format change:

  • Before: ... was repeated N times without new file reads between repeats. Returning partial state.
  • After: ... 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

  • Bug fix (operator-UX cosmetic — message-format only)
  • New feature
  • Refactor
  • Documentation
  • Breaking change

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 lint passes

  • npm run typecheck passes

  • npm run test passes

Backwards compatibility

  • No API/schema/code change beyond the one message-format string + 2 test assertions.
  • structuredContent fields completely unchanged.

🤖 Generated with Claude Code

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>
@qmt qmt requested a review from Copilot April 30, 2026 20:52
@qmt qmt merged commit 08403b9 into main Apr 30, 2026
6 checks passed
@qmt qmt deleted the v1.16.1-r2-message-enrichment branch April 30, 2026 20:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PROGRESS error message with (after <iterations> iter(s), <filesRead> file(s) read) in ask_agentic.
  • Update the existing unit test to assert the enriched message includes iterations + files-read counts.
  • Bump versions to 1.16.1 and add a 1.16.1 changelog 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.`,
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md
> `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.`
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
> `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.`

Copilot uses AI. Check for mistakes.
Comment on lines +551 to +552
expect(errorMessage).toMatch(/after \d+ iter/);
expect(errorMessage).toMatch(/\d+ files? read/);
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
expect(errorMessage).toMatch(/after \d+ iter/);
expect(errorMessage).toMatch(/\d+ files? read/);
expect(errorMessage).toMatch(/\(after \d+ iter, \d+ files? read\)/);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants