Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Dec 16, 2025

Closes: #162

@35C4n0r 35C4n0r self-assigned this Dec 16, 2025
@35C4n0r 35C4n0r marked this pull request as draft December 16, 2025 09:20
@github-actions
Copy link

✅ Preview binaries are ready!

To test with modules: agentapi_version = "agentapi_163" or download from: https://github.com/coder/agentapi/releases/tag/agentapi_163

@35C4n0r 35C4n0r marked this pull request as ready for review December 16, 2025 13:39
@35C4n0r 35C4n0r requested review from mafredri and matifali December 16, 2025 13:39
@35C4n0r 35C4n0r changed the title feat(tool_call): implement tool call logging and improve format handling feat(claude/tool_call): add tool call logging and improve format handling Dec 16, 2025
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

I tested it and it appears to work, although I wasn't able to reproduce the issue. It doesn't look like the test changes do either. I can't say for sure if this will actually resolve the issue, although the changes mostly look OK to me.

expected, err := testdataDir.ReadFile(path.Join(dir, string(agentType), c.Name(), "expected.txt"))
assert.NoError(t, err)
assert.Equal(t, string(expected), FormatAgentMessage(agentType, string(msg), string(userInput)))
output, _ := FormatToolCall(agentType, FormatAgentMessage(agentType, string(msg), string(userInput)))
Copy link
Member

Choose a reason for hiding this comment

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

Should also asserted the matched tool calls here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done !

Comment on lines +3 to +10
● coder - coder_report_task (MCP)(summary: "Snake game created
successfully at snake-game.html",
link: "file:///home/coder/snake-ga
me.html", state: "working")
⎿ {
"message": "Thanks for reporting!"
}

Copy link
Member

Choose a reason for hiding this comment

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

On its own, adding this does not cause any test failures on main. We should have a sample input that reproduces the issue so that we can have confidence in the fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was adde to verify the case where the message starts with a tool call

@35C4n0r 35C4n0r merged commit 311ed8a into main Dec 19, 2025
3 checks passed
@35C4n0r 35C4n0r deleted the feat-report-tasks-log branch December 19, 2025 16:04
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.

bug: Task Reporting messages sometimes still show up

2 participants