You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(llc): Claude Code session adapter — claude_code adapter type for agent heartbeat #8258
The LLC agent system supports a pluggable adapter protocol (invoke / status / cancel) with adapters for process, http, and autobot_agent types. A claude_code adapter type is needed to allow agents to run Claude Code CLI sessions as their heartbeat execution vehicle.
Problem
Without a claude_code adapter, AI agents that need to run multi-step coding tasks (file edits, test runs, git operations) via Claude Code sessions cannot be plugged into the LLC heartbeat-driven orchestration loop. Teams must fall back to generic process adapters that lack session continuity and context management.
Acceptance Criteria
Adapter Implementation
autobot-backend/llc/adapters/claude_code_adapter.py — ClaudeCodeAdapter implementing the three-method adapter protocol
invoke(agent_config, context) → run_id: launches claude CLI subprocess with task context injected as system prompt; returns session ID as run_id
status(agent_config, run_id) → AdapterRunStatus: reads exit code / in-progress signal from session state file or subprocess
cancel(agent_config, run_id) → bool: sends SIGTERM to subprocess; returns True if stopped
Adapter registered in AdapterRegistry under key "claude_code"
Context Injection
Fat context mode: RAG-assembled brief injected as --system-prompt argument
Thin context mode: task_id + API base URL only
--output-format stream-json used to capture structured output
Tool use permissions scoped per agent config (allowed_tools list in adapter_config)
Session Continuity
Session ID stored in Redis llc:agent:{id}:claude_session for multi-turn continuity
--resume {session_id} flag used when prior session ID exists and is < 4h old
Session ID cleared on cancel or terminated agent status
Activity
feat(llc): claude_code adapter — ClaudeCodeAdapter for heartbeat sess…
feat(llc): claude_code adapter — ClaudeCodeAdapter for heartbeat sess…
Merge pull request #8530 from mrveiss/issue-8258