-
Notifications
You must be signed in to change notification settings - Fork 59
feat: refactor claude code to use agentapi module #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # registry/coder/modules/claude-code/README.md # registry/coder/modules/claude-code/main.tf # registry/coder/modules/claude-code/scripts/agentapi-start.sh # registry/coder/modules/claude-code/scripts/agentapi-wait-for-start.sh # registry/coder/modules/claude-code/testdata/agentapi-mock.js
|
||
The `codercom/oss-dogfood:latest` container image can be used for testing on container-based workspaces. | ||
- You must add the [Coder Login](https://registry.coder.com/modules/coder-login) module to your template for task reporting features. | ||
- An **Anthropic API key** is required for tasks. You can get one from the [Anthropic Console](https://console.anthropic.com/dashboard). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make Tasks also work with CLAUDE_SESSION_TOKEN. For Claude.ai Pro and Max plan users.
Here is community member talking about it.
https://discord.com/channels/747933592273027093/1404654368745193492/1404692501268529206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matifali thanks for linking this, added it to the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@35C4n0r Can we also mention the CLAUDE_SESSION_TOKEN
here?
Linked the issue, the issue also asks for subdomain, will add that today. |
added subdomain 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Provided we are cool with the shift of standardization in variables for AI Modules this looks good to me. I have tested and it works fine.
|
||
The `codercom/oss-dogfood:latest` container image can be used for testing on container-based workspaces. | ||
- You must add the [Coder Login](https://registry.coder.com/modules/coder-login) module to your template for task reporting features. | ||
- An **Anthropic API key** is required for tasks. You can get one from the [Anthropic Console](https://console.anthropic.com/dashboard). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@35C4n0r Can we also mention the CLAUDE_SESSION_TOKEN
here?
agent_id = coder_agent.example.id | ||
workdir = "/home/coder/project" | ||
|
||
# --- Authentication --- required for tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# --- Authentication --- required for tasks |
# OR | ||
claude_code_oauth_token = "xxxxx-xxxx-xxxx" | ||
|
||
# --- Versioning --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# --- Versioning --- |
claude_code_version = "1.0.82" # Pin to a specific version | ||
agentapi_version = "v0.6.1" | ||
|
||
# --- Task Configuration --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# --- Task Configuration --- |
continue = true # will fail in a new workspace with no conversation/session to continue | ||
model = "sonnet" | ||
|
||
# --- Permissions & Tools --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# --- Permissions & Tools --- |
# --- Permissions & Tools --- | ||
permission_mode = "plan" | ||
|
||
# --- MCP Configuration --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# --- MCP Configuration --- |
|
||
Run Claude Code as a standalone app in your workspace. This will install Claude Code and run it without any task reporting to the Coder UI. | ||
Run Claude Code as a standalone CLI in your workspace without task reporting to the Coder UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run Claude Code as a standalone CLI in your workspace without task reporting to the Coder UI. | |
Run and configure Claude Code as a standalone CLI in your workspace. |
| -------------------------------- | ------------------------------------------------------------- | ------------------------------ | | ||
| `CLAUDE_API_KEY` | Your Anthropic API key. | `""` | | ||
| `CODER_MCP_CLAUDE_SYSTEM_PROMPT` | A custom system prompt for Claude. | "Send a task status update..." | | ||
| `CODER_MCP_CLAUDE_CODER_PROMPT` | A custom coder prompt for Claude. | `""` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is it for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the environment variable section, it's causing confusion.
ref: https://coder-uae3647.slack.com/archives/C08PHACTZRB/p1756400068946909?thread_ts=1756398053.136979&cid=C08PHACTZRB
Closes #302
Description
Type of Change
Module Information
Path:
registry/[namespace]/modules/[module-name]
New version:
v3.0.0
Breaking change: [ ] Yes [ ] No
Testing & Validation
bun test
)bun run fmt
)Related Issues