Skip to content

fix(agentic): improve Write two-step content generation reliability#903

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/write-content-empty-extraction-reliability
May 27, 2026
Merged

fix(agentic): improve Write two-step content generation reliability#903
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/write-content-empty-extraction-reliability

Conversation

@bobleer
Copy link
Copy Markdown
Collaborator

@bobleer bobleer commented May 27, 2026

Summary

  • Retry Write content-generation follow-up when <bitfun_contents> extraction returns empty, with clearer diagnostic logging (raw text length/preview, reasoning chars, stream end state).
  • Emit a structured tool failure after exhausting retries so the agent receives actionable guidance instead of silently writing an empty file.
  • Replace the contradictory "content is required" error with two-step protocol guidance in FileWriteTool, and document the protocol more explicitly in the tool description.

Test plan

  • cargo check -p bitfun-core
  • cargo test -p bitfun-core plaintext_followup_missing_content_returns_two_step_guidance -- --nocapture

Retry when follow-up extraction yields empty content, add diagnostic
logging for empty streams, and return clearer two-step protocol guidance
instead of a contradictory "content is required" error.
@bobleer bobleer merged commit 7318bbc into GCWing:main May 27, 2026
1 check passed
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.

1 participant