feat(claude):with previous conversation & isolate context #279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With -c, Claude continues the most recent conversation session, maintaining context and history from previous interactions. Without -c, Claude starts a fresh conversation with no prior context, treating each interaction as independent.
See https://docs.anthropic.com/en/docs/claude-code/cli-reference
When using claude -c, mounting to the same host Claude directory causes unexpected context contamination. For example, in luoliwoshang/agent-test#26 (comment), there shouldn't be any mention of go-introduction.md since that content belongs to a different unmerged PR's context (luoliwoshang/agent-test#28).
Currently, all containers share the same Claude config directory mounted at /home/codeagent/.claude (see internal/code/claude_docker.go:65). We need to isolate Claude's data directory per PR, similar to how we handle workspace isolation in /tmp/codeagent/{workspace-id}.
with the feature support ( isolate claude config) 50107fb
this pr luoliwoshang/agent-test#32 create a isolate claude config folder and only have this pr 's context luoliwoshang/agent-test#32 (comment)
ANTHROPIC_API_KEY
、ANTHROPIC_AUTH_TOKEN
、 fallback to use host mashine 's .claude folder to auth