Skip to content

Query agentapi for claude-code status #136

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: claude-code-web
Choose a base branch
from

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Jun 5, 2025

Depends on #135 and coder/coder#18262

As discussed, this adds a bash script that gets the status from agentapi then relays that to coderd. I wonder if we should make it part of coder exp though? Handling JSON in Bash is pretty janky. Or we could do it in JS since we already have Node available.

Refactored into coder exp.

In any case, it looks like /status just reports stable or running. Do we need to modify this endpoint or is there something else I should be using? Initially I thought the endpoint we need already existed but I may have misunderstood.

We decided to just update the status and preserve the last message if any for now.

@code-asher code-asher force-pushed the asher/claude-status-poll branch from 5ab30fa to 265a88f Compare June 5, 2025 00:58
@kylecarbs
Copy link
Member

@code-asher i'm so sorry this was me lmao

@code-asher
Copy link
Member Author

Ahahaha I was wondering what was going on lol

@code-asher code-asher force-pushed the asher/claude-status-poll branch from 265a88f to 5b2b244 Compare June 5, 2025 02:12
@code-asher code-asher requested a review from hugodutka June 5, 2025 02:16
@code-asher code-asher force-pushed the asher/claude-status-poll branch 3 times, most recently from 21d8bd3 to d4686e0 Compare June 5, 2025 02:23
@hugodutka
Copy link
Contributor

hugodutka commented Jun 5, 2025

Do we need to modify this endpoint or is there something else I should be using

In my mind you'd poll agentapi for current messages and status and then use an LLM to summarize what it's done since the previous update. You're right - bash is probably not the right tool for this job. What do you think about building this tool into coder? You could spawn it in the workspace with coder exp task report-status. I built a Go SDK that might be useful: https://github.com/coder/agentapi-sdk-go. Coderd also already has access to LLM api keys if the admin supplies them: https://github.com/coder/coder/blob/main/cli/server.go#L2697

@code-asher code-asher force-pushed the asher/claude-status-poll branch from d4686e0 to f611735 Compare June 5, 2025 23:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants