Skip to content

fix: respect tool-specific env vars for session storage paths#14

Merged
yigitkonur merged 1 commit intoyigitkonur:mainfrom
yutakobayashidev:fix/respect-env-var-overrides
Feb 25, 2026
Merged

fix: respect tool-specific env vars for session storage paths#14
yigitkonur merged 1 commit intoyigitkonur:mainfrom
yutakobayashidev:fix/respect-env-var-overrides

Conversation

@yutakobayashidev
Copy link
Copy Markdown
Contributor

@yutakobayashidev yutakobayashidev commented Feb 25, 2026

Summary

Parsers now check each tool's official environment variable override before falling back to the default os.homedir()-based paths. Without this, users who customize their config directories via env vars will have their sessions silently missed by continues.

  • Claude Code: check CLAUDE_CONFIG_DIR$CLAUDE_CONFIG_DIR/projects/
  • Codex CLI: check CODEX_HOME$CODEX_HOME/sessions/
  • Gemini CLI: check GEMINI_CLI_HOME$GEMINI_CLI_HOME/.gemini/tmp/
  • OpenCode: check XDG_DATA_HOME$XDG_DATA_HOME/opencode/

The remaining 3 tools (Copilot, Factory Droid, Cursor) have no env var override mechanism, so they are unchanged.

References

Each env var matches the tool's own config resolution:

Tool Env Var Source
Claude Code CLAUDE_CONFIG_DIR docs: Settings — Environment variables
Codex CLI CODEX_HOME codex-rs/utils/home-dir/src/lib.rs#L11-L15find_codex_home() reads CODEX_HOME env var
Gemini CLI GEMINI_CLI_HOME packages/core/src/utils/paths.ts#L20-L26, docs: Configuration
OpenCode XDG_DATA_HOME packages/opencode/src/global/index.ts#L2-L9xdgData from xdg-basedir resolves $XDG_DATA_HOME/opencode

Test plan

  • tsc compiles clean
  • All 278 unit tests pass (vitest run)
  • Manual: set CLAUDE_CONFIG_DIR=/tmp/test-claude and verify continues list --source claude reads from the custom path
  • Manual: set CODEX_HOME=/tmp/test-codex and verify continues list --source codex reads from the custom path

🤖 Generated with Claude Code

Parsers now check CLAUDE_CONFIG_DIR, CODEX_HOME, GEMINI_CLI_HOME, and
XDG_DATA_HOME before falling back to the default home-based paths.
This matches each tool's own config resolution behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yutakobayashidev yutakobayashidev marked this pull request as ready for review February 25, 2026 07:03
@yigitkonur yigitkonur merged commit da75a01 into yigitkonur:main Feb 25, 2026
yigitkonur added a commit that referenced this pull request Feb 25, 2026
Rewrote the entire README to read like an actual developer wrote it:
- Punchier intro that leads with the problem, not a feature list
- Collapsed the 14×14 checkmark matrix into one sentence
- Cut 430→238 lines by removing redundancy and AI-doc patterns
- Added Community Contributions section referencing #1, #3, #4, #14
- Documented the 7 new agents (Amp, Kiro, Crush, Cline, Roo Code,
  Kilo Code, Antigravity) and bugs fixed in this round
- Prose over bullet spam, natural flow over exhaustive structure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
yigitkonur added a commit that referenced this pull request Feb 25, 2026
Implements the approach from PR #14 by @yutakobayashidev and extends it
to all applicable parsers:

  - Claude Code: CLAUDE_CONFIG_DIR → $CLAUDE_CONFIG_DIR/projects/
  - Codex CLI: CODEX_HOME → $CODEX_HOME/sessions/
  - Gemini CLI: GEMINI_CLI_HOME → $GEMINI_CLI_HOME/.gemini/tmp/
  - OpenCode: XDG_DATA_HOME → $XDG_DATA_HOME/opencode/
  - Amp CLI: XDG_DATA_HOME → $XDG_DATA_HOME/amp/threads/
  - Antigravity: GEMINI_CLI_HOME → $GEMINI_CLI_HOME/.gemini/antigravity/

Without this, users who customize their config directories via env vars
have their sessions silently missed by continues.

Also adds envVar metadata to the adapter registry so the help output
shows which env vars override each tool's storage path.

Verified: CLAUDE_CONFIG_DIR=/tmp/fake-dir correctly redirects discovery
away from ~/.claude (886→0 sessions), confirming the override works.

Refs: #14

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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