Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Jan 13, 2026

Description

  • Format report_task tool call for codex
  • Add related tests

@35C4n0r 35C4n0r self-assigned this Jan 13, 2026
@github-actions
Copy link

✅ Preview binaries are ready!

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

@35C4n0r 35C4n0r requested review from johnstcn and matifali January 13, 2026 03:53
Comment on lines +54 to +55
msg += "\n" // This handles the case where the message ends with a tool call
lines := strings.Split(msg, "\n")
Copy link
Member

Choose a reason for hiding this comment

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

This smells to me like it could be instead handled by finding a start of a tool call and treating reaching the end of lines as a signal to use that as the end index.

} else if toolCallStartIdx != -1 && line == "{\"message\": \"Thanks for reporting!\"}" {
// Store [start, end] pair
// trim all the remaining empty lines after tool call
for idx+1 < len(lines)-1 {
Copy link
Member

Choose a reason for hiding this comment

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

Could we not find all "start" and "end" indices in a single loop iteration?

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.

2 participants