feat: add session continuity for full context forwarding#40
Open
marcusquinn wants to merge 3 commits intosteipete:mainfrom
Open
feat: add session continuity for full context forwarding#40marcusquinn wants to merge 3 commits intosteipete:mainfrom
marcusquinn wants to merge 3 commits intosteipete:mainfrom
Conversation
- Add sessionId parameter to maintain conversation state across calls - Add messages array for injecting conversation history on first call - Use Claude CLI --resume flag for session continuation - Parse JSON output to extract session_id for mapping - Add slash command translation (/ -> @) for subagent invocation - Add stateless option for backward-compatible single-prompt mode - Update tool description to document new capabilities This enables parent interfaces to use claude-code-mcp as if Claude Code were the model, with full context awareness and session continuity.
- Add LRU-style session map eviction (max 1000 sessions) - Fix slash command regex to avoid matching file paths - Improve JSON parsing to handle multi-line output - Add runtime validation for sessionId and messages parameters - Restore detailed JSDoc for findClaudeCli function - Improve error message for missing prompt parameter
- Store session mappings in ~/.config/claude-code-mcp/sessions.json - Sessions persist across MCP server restarts - Auto-expire sessions after 24 hours - Clean expired sessions on load - Maintain LRU eviction (max 1000 sessions) This enables session continuity even when the MCP server is spawned fresh for each call (e.g., via npx).
marcusquinn
added a commit
to marcusquinn/aidevops
that referenced
this pull request
Jan 25, 2026
Keep using github:marcusquinn/claude-code-mcp fork until steipete/claude-code-mcp#40 is merged.
marcusquinn
added a commit
to marcusquinn/aidevops
that referenced
this pull request
Jan 25, 2026
* refactor: optimize MCP loading with lazy-load strategy - Add claude-code subagent for on-demand claude-code-mcp access - Remove claude-code-mcp_* from main agent tool lists (Build+, AI-DevOps) - Set 12 MCPs to lazy-load (enabled: false): claude-code-mcp, gsc, localwp, chrome-devtools, outscraper, amazon-order-history, google-analytics-mcp, dataforseo, shadcn, macos-automator, quickfile, MCP_DOCKER - Keep 8 MCPs eager-loaded for all main agents: osgrep, augment-context-engine, context7, repomix, playwriter, gh_grep, sentry, socket - Enable playwriter_* and repomix_* globally for all main agents - Add MCP loading policy enforcement to update existing configs This reduces OpenCode startup time by deferring MCP server initialization until the specific subagent that needs them is invoked. * fix: address code review feedback - Remove hardcoded /opt/homebrew/bin/npx fallback, use shutil.which only - Add warning for uncategorized MCPs in loading policy - Remove redundant else blocks that duplicated loading policy logic - Update claude-code-mcp.json template to use upstream @steipete package - Add sys import for stderr warnings * fix: revert to fork until upstream PR #40 merged Keep using github:marcusquinn/claude-code-mcp fork until steipete/claude-code-mcp#40 is merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Changes
sessionIdparameter and--resumeflag support~/.claude-code-mcp/sessions/survive restarts/ -> @for subagent invocationTesting
Source