Skip to content

fix: use claude-agent-acp, enable concurrent updates, add MCP + CLAUDE.md#36

Merged
cardosofede merged 9 commits intomainfrom
fix/agent-acp-mcp-concurrency
Mar 9, 2026
Merged

fix: use claude-agent-acp, enable concurrent updates, add MCP + CLAUDE.md#36
cardosofede merged 9 commits intomainfrom
fix/agent-acp-mcp-concurrency

Conversation

@fengtality
Copy link
Copy Markdown
Contributor

Summary

Fixes several bugs in the /agent command that caused it to hang or fail silently.

Changes

🐛 Bug Fixes

condor/acp/client.py — Switch ACP command to claude-agent-acp

  • cc-acp (claude-code-acp package) rejected MCP servers entirely
  • @zed-industries/claude-agent-acp supports stdio MCP servers and proper Claude subscription auth
  • Install: npm install -g @zed-industries/claude-agent-acp

main.py — Enable concurrent_updates=True

  • Without this, a long-running agent session blocked ALL other bot commands
  • Now other commands (/portfolio, /bots, etc.) work while the agent is thinking

handlers/agents/_shared.py — Fix hardcoded MCP path

  • Was: /Users/dman/Documents/mcp (another developer's machine)
  • Now: Path.home() / 'mcp' (dynamic, works on any machine)

✨ New Files

condor_mcp.py — Condor MCP server

  • Exposes widget bridge tools to the agent via MCP
  • Tools: send_buttons, send_notification, manage_routines, manage_servers, get_user_context
  • Runs as a stdio MCP server alongside mcp-hummingbot in each agent session

CLAUDE.md — Agent self-description

  • Auto-loaded by claude-agent-acp at session start
  • Describes capabilities, MCP tools, output rules, dangerous action confirmation pattern
  • Prevents the agent from exploring 30+ source files to answer questions about itself (which caused context overflow and silent response loss)

utils/deeplink.py — Telegram deep link encoder/decoder

  • Compact base64 format for server registration via bot links

Testing

  • /agent → Claude now starts successfully and responds to messages
  • Other commands no longer freeze while agent is running
  • MCP tools available in agent session (verify with: what tools do you have?)

Prerequisites

npm install -g @zed-industries/claude-agent-acp

@fengtality fengtality changed the base branch from main to feat/add_tui March 7, 2026 17:47
@fengtality
Copy link
Copy Markdown
Contributor Author

Screenshot 2026-03-09 at 10 14 19 AM

@fengtality fengtality marked this pull request as ready for review March 9, 2026 13:14
fengtality and others added 8 commits March 9, 2026 18:46
- Switch ACP command from cc-acp → claude-agent-acp (@zed-industries/claude-agent-acp)
  which supports MCP servers and proper auth
- Enable concurrent_updates=True so agent sessions don't freeze other commands
- Fix hardcoded /Users/dman/Documents/mcp path → dynamic Path.home() / 'mcp'
- Add condor_mcp.py: MCP server exposing widget bridge tools to the agent
  (send_buttons, send_notification, manage_routines, manage_servers, get_user_context)
- Add CLAUDE.md: agent self-description so it doesn't explore the codebase
  on every question (prevents 30+ file reads, context explosion)
- Add utils/deeplink.py: compact base64 deep link encoder/decoder
Capture usage_update notifications from claude-agent-acp and display
context consumption in the /agent menu and via a new get_session_usage
MCP tool that the agent can query mid-conversation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini CLI now speaks ACP v1 (same as claude-agent-acp), so remove the
old v0.0.9 protocol variant. All agents now use the standard
initialize → session/new → session/prompt flow, which means Gemini
gets MCP servers, usage tracking, and initial context for free.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tells the agent to lead with answers, use MCP tools directly,
keep tool chains short, and avoid unnecessary codebase exploration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove hardcoded absolute path from CLAUDE.md
- Soften "think less act more" to "be direct, not verbose" (trading safety)
- Add comment explaining dual UsageUpdate firing is harmless
- Add security note to deeplink.py about base64 not being encryption

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n recs

Fetches in parallel:
- CEX + wallet balances via portfolio.get_state()
- LP positions with OOR/fee status via gateway_clmm.search_positions()
- Active/stopped bots via bots.get_bots()

Surfaces recommended actions:
- OOR positions → close/rebalance via /lp
- Pending fees above threshold → collect via /lp
- Stopped bots → restart via /bots

Configurable: run_hour, run_minute, fee_alert_usd, include_* toggles
Daily scheduled (CONTINUOUS=False), graceful fallback if edit fails
Keep essential behavior/formatting rules inline, add reference to
CONDOR.md for full details on identity, tools, permissions, and rules.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fengtality fengtality force-pushed the fix/agent-acp-mcp-concurrency branch from 9ab2c17 to 6ba586f Compare March 9, 2026 21:46
@fengtality fengtality changed the base branch from feat/add_tui to main March 9, 2026 21:47
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cardosofede cardosofede merged commit ce8981f into main Mar 9, 2026
1 check passed
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