Skip to content

0.5.0

Latest

Choose a tag to compare

@arttttt arttttt released this 13 Mar 21:13

TLDR

Unified 7-stage modular pipeline replaces the monolithic upstream handler with extract → routing → headers → thinking → forward → transform → response stages. Subagent session affinity via CC hooks and AC markers routes each subagent to a pinned backend across its lifetime. Teammate pipeline with /teammate/{agent_id} URL-path routing and synchronous tmux shim registration enables per-agent backend selection for Agent Teams. Session token handshake via ANTHROPIC_CUSTOM_HEADERS secures proxy traffic. Per-session log file isolation prevents multi-instance log corruption. Ctrl+R restarts Claude Code while preserving the session via --resume. Dev builds are stamped with git hash and expose --version.

Breaking Changes

Config: [agent_teams] renamed to [agents] — if you have [agent_teams] in your config, rename it to [agents]. The teammate_backend field is unchanged. New optional field subagent_backend added for subagent routing.

# Before (0.4.0)
[agent_teams]
teammate_backend = "glm"

# After (0.5.0)
[agents]
teammate_backend = "glm"
subagent_backend = "glm"  # optional, new

Features

  • Unified 7-stage pipeline — modular extract/routing/headers/thinking/forward/transform/response stages behind clean interfaces (0142708)
  • Subagent session affinity — CC hooks register subagents in a shared registry, AC markers (⟨AC:{id}⟩) route requests to pinned backends (dadbddc, 8f019e5)
  • Teammate pipeline/teammate/{agent_id}/* URL-path routing with TeammateMarker extension, always-strip path semantics (52ff649)
  • Tmux shim teammate injection — detects --agent-id, registers via /api/teammate-start, rewrites ANTHROPIC_BASE_URL per-teammate (52ff649)
  • Session token auth — handshake via ANTHROPIC_CUSTOM_HEADERS, hook endpoints exempt from auth (d01cf79, e1b8c9b)
  • Subagent backend UI — backend selection popup and runtime toggle for subagent routing (44a4478, 64e36bf)
  • Per-session log isolation — per-instance log file names, old log cleanup on startup (ee5fd00, 988dd53)
  • Dev build versioning — git hash stamp, --version flag (a9a94ac)

Bug Fixes

  • Skip AC marker parsing when subagent registry is empty (3d80718)
  • Detect teammate spawns by --agent-id flag instead of binary path (ab02d03)
  • Inject shim PATH into initial spawn env (a0f7c10)
  • Disable session token check for teammate pipeline (3878f47)
  • Update spawn env with actual proxy port after try_bind() (9fc2b0d)
  • Resolve 3 critical pipeline bugs found in review (20cea7c)
  • Use append mode instead of truncate for log files (f63adb7)
  • Ctrl+R now resumes current session via --resume (668a8ec)
  • --continue now uses --resume for existing sessions (cb0b4bf)
  • Replace fragile sed with bash regex in tmux shim (127b121)
  • Patch dependency vulnerabilities and optimize release profile (1735bc5)
  • Always set CLAUDE_CODE_SUBAGENT_MODEL env var (18dd02b)
  • Update stale shim tests to match current injection logic (7ac8682)

Refactor

  • Remove legacy pipeline and unified-pipeline feature flag (aa32d37)
  • Rename SubagentBackend/SubagentRegistryAgentBackendState/AgentRegistry for unified agent routing (52ff649)
  • Harden AC marker parsing against false positives (82e4409)
  • Use agent_id instead of session_id for subagent routing (d4f4088)
  • Remove CLAUDE_CODE_SUBAGENT_MODEL in favor of AC marker routing (7901db3)
  • Rename AgentTeamsConfigAgentsConfig (a61e1b9)
  • Add SAFETY comments, reduce cloning, deduplicate formatting (dfe3b47)

Testing

  • Pipeline integration tests — 7-stage pipeline end-to-end (pipeline_integration.rs)
  • Pipeline stage unit tests — per-stage isolation (pipeline_stages.rs)
  • Subagent session affinity tests (subagent_session_affinity.rs)
  • Session token auth tests (session_token_auth.rs)
  • Spawn env corner case tests (spawn_env_corner_cases.rs)
  • Ctrl+R restart tests (restart_claude.rs)
  • Shim detection and injection tests (shim.rs)