refactor(models): Refine MessageAgentThought SQLAlchemy typing - #11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5209691271
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tool_call_response.append( | ||
| ToolPromptMessage( | ||
| content=tool_responses.get(tool, agent_thought.observation), | ||
| content=str(tool_inputs.get(tool, agent_thought.observation)), | ||
| name=tool, |
There was a problem hiding this comment.
Use tool responses when building tool messages
The tool response message is currently populated from tool_inputs rather than the parsed observations, so when agent_thought.observation contains the actual tool output (JSON or plain text), the reconstructed tool message will echo the input instead of the response. This changes the conversation history fed back to the model and can lead to incorrect reasoning or summaries because the LLM never sees the tool output. The earlier logic used tool_responses.get(...); restoring that (or otherwise using tool_responses) will keep tool-call results consistent with stored observations.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#11