feat: enhance decision tracking with tool result visibility#23
Merged
feat: enhance decision tracking with tool result visibility#23
Conversation
- Add DecisionRecord and DecisionResult structures for tracking agent decisions - Implement decision ID tracking throughout execution flow - Make tool execution results visible in agent memory - Replace time-based filtering with deterministic count-based approach (last 3 results) - Add content truncation to prevent context explosion - Include comprehensive unit tests for all new functionality This allows the agent to see the actual content returned by tools (HTTP responses, file contents, etc.) rather than just knowing that tools were executed. The count-based filtering ensures deterministic behavior regardless of agent speed.
14101c0 to
80fd00e
Compare
- Add get_tools_with_schemas method to MCP client for tool discovery - Add timeout_secs to LLMConfig for configurable timeouts - Implement smart timeout defaults for Ollama based on model size (30min for 70b/405b, 5min for others) - Update tests to include timeout_secs field
80fd00e to
e724c7f
Compare
- Replace positional format arguments with named placeholders - Use direct variable names in placeholders where applicable - Use named parameters only for methods and properties - Ensure all format strings follow CONVENTIONS.md guidelines - Fix redundant format arguments caught by clippy
Simplify timeout logic to avoid model-specific checks that may not cover all cases. A 30-minute timeout is reasonable for all models.
Use named parameters for string interpolation as per CONVENTIONS.md
douglaz
added a commit
that referenced
this pull request
Sep 1, 2025
- Implement intelligent JSON-aware truncation that preserves structure - Add error handling for failed decision parsing (prevents NULL results) - Improve parameter serialization using JSON instead of Debug format - Include complete tool output for all action types (Remember, Wait, Explore) - Remove redundant tool_result_* memory entries (outputs only in decisions) - Add metadata fields (_truncated, _original_size) for truncated outputs - Recursively handle nested objects in truncation algorithm These improvements build on PR #23's foundation by adding: 1. Smart truncation vs basic string cutting 2. Error result handling for invalid actions 3. Better parameter display format 4. Complete output tracking for all actions
5 tasks
douglaz
added a commit
that referenced
this pull request
Sep 1, 2025
) - Implement intelligent JSON-aware truncation that preserves structure - Add error handling for failed decision parsing (prevents NULL results) - Improve parameter serialization using JSON instead of Debug format - Include complete tool output for all action types (Remember, Wait, Explore) - Remove redundant tool_result_* memory entries (outputs only in decisions) - Add metadata fields (_truncated, _original_size) for truncated outputs - Recursively handle nested objects in truncation algorithm These improvements build on PR #23's foundation by adding: 1. Smart truncation vs basic string cutting 2. Error result handling for invalid actions 3. Better parameter display format 4. Complete output tracking for all actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
DecisionRecordandDecisionResultfor structured decision trackingTechnical Details
The agent can now see what tools actually returned rather than just knowing they were executed. For example:
The count-based filtering (last 3 results) ensures:
Test Plan