Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Nov 3, 2025

I don't like this.
Thinking of a better way to approach Initial prompt, also wondering why it fails on coder (remote) but works on local agentapi, is it because of latency? Will need to test that out with a debug PR.

cc: @matifali @johnstcn

@35C4n0r 35C4n0r self-assigned this Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

✅ Preview binaries are ready!

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

@35C4n0r 35C4n0r requested review from johnstcn and matifali November 3, 2025 13:17
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.

Is this still a 'hack' as per the PR title? Has your testing turned up any further information?

for i := len(lines) - 1; i >= 1; i-- {
if strings.TrimSpace(lines[i-1]) == "" &&
for i := len(lines) - 1; i >= 2; i-- {
if strings.ReplaceAll(lines[i-2], " ", "") != "┃┃" &&
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test that fails without this change please?

}

func formatOpencodeMessage(message string, userInput string) string {

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Comment on lines +331 to +337
if s.agentType == mf.AgentTypeOpencode {
time.Sleep(5 * time.Second)
// If we still have it as stable, go ahead.
if convertStatus(s.conversation.Status()) != AgentStatusStable {
continue
}
}
Copy link
Member

Choose a reason for hiding this comment

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

The reason for this change isn't clear. Can you add some clearer comments as to why we need to wait 5 seconds?

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