Skip to content

fix: harden tool calls and claudecode planning#4

Open
Gujiassh wants to merge 1 commit intosanbuphy:mainfrom
Gujiassh:fix/claudecode-plan-bootstrap
Open

fix: harden tool calls and claudecode planning#4
Gujiassh wants to merge 1 commit intosanbuphy:mainfrom
Gujiassh:fix/claudecode-plan-bootstrap

Conversation

@Gujiassh
Copy link
Contributor

Summary

  • add the missing malformed-JSON/unknown-tool guardrails back to agent.py so tool-call decoding no longer crashes the base loop
  • fix agent-claudecode.py --plan so planning happens before plan_mode is enabled, allowing generated steps to actually run
  • add a regression that proves the ClaudeCode variant executes planned steps end-to-end instead of returning an empty result

Validation

  • python3 -m py_compile agent.py agent-claudecode.py tests/test_agent.py
  • python3 -m unittest discover -s tests -p "test_agent.py"

Notes

  • this PR intentionally avoids overlapping the already-merged tool-loop guardrails line by focusing on the still-broken origin/main behavior in the base agent and the separate ClaudeCode --plan bootstrap path

Keep malformed tool payloads from crashing the base agent and stop the ClaudeCode --plan path from failing before it ever executes planned steps.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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