Skip to content

Add direct Claude Code runtime and web integration - #1112

Merged
chen-ran merged 2 commits into
stack/codex-direct-runtimefrom
stack/claude-code-direct-runtime
Sep 1, 2026
Merged

Add direct Claude Code runtime and web integration#1112
chen-ran merged 2 commits into
stack/codex-direct-runtimefrom
stack/claude-code-direct-runtime

Conversation

@akazwz

@akazwz akazwz commented Aug 31, 2026

Copy link
Copy Markdown
Member

变更内容

  • 新增 Claude Code direct runtime,接入持久化认证、自定义 Anthropic Base URL/API Key、模型目录、工具调用、Ask User 和会话恢复。
  • Web 统一使用 External Agents 概念管理 Codex、Claude Code 和通用 ACP,包括创建、配置、会话、模型选择、工具展示和交互卡片。
  • 同步最终 OpenAPI 与前端 SDK,使新 Agent、会话和 Codex 认证接口与 Web 调用方一次落地。
  • 完成架构层存量数据迁移对应的 Web/runtime 接线,并从最终产品入口移除 Hermes。
  • 完成 stack 最终接线,并纳入拆分后发现的 migration 升级兼容性修复。

风险与兼容性

  • 数据库迁移会改写存量 Codex/Claude Code runtime 绑定;down migration 可恢复 ACP 形态,但不会迁移或复制明文凭证。
  • workspace contract 升级到 v3,旧 workspace image 需要重建后才能运行 direct runtime。
  • 通用 ACP 继续保留,自定义 Agent 的启动方式不变。

验证

  • stack 的架构层与 Codex 层均已在独立 worktree 通过全量 Go 测试。
  • refactor(agent): split Codex and Claude Code into direct runtimes #1108 head 已人工确认 Codex/Claude Code 的核心回复、模型选择、工具调用、Ask User 和持久化刷新流程。
  • 当前 head 的数据库 migration 已通过完整 PostgreSQL up/down、legacy upgrade 和三层 CI。
  • Agent QA(Ego)已在当前 stack 顶层用全新 Codex/Claude Code sessions 回归回复、Shell/Bash 工具、Ask User、模型目录和刷新重开持久化;仍需人工确认当前 head 的升级 happy path。

⚠️ No human QA — this PR has not been verified by a human yet. Remove this line once a human confirms the happy path.

@akazwz
akazwz requested review from a team as code owners August 31, 2026 05:08
@akazwz akazwz changed the title feat(agent): add direct Claude Code runtime and web integration Add direct Claude Code runtime and web integration Aug 31, 2026
@akazwz
akazwz requested review from a team as code owners August 31, 2026 05:11
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from f1552c3 to d5b876a Compare August 31, 2026 05:11
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from d5b876a to bc57694 Compare August 31, 2026 05:14
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from bc57694 to 2a3653b Compare August 31, 2026 05:20
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from 2a3653b to 9889e70 Compare August 31, 2026 06:11
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from 9889e70 to 2ef7463 Compare August 31, 2026 09:29
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from 2ef7463 to 4d9bde9 Compare August 31, 2026 10:14
@akazwz
akazwz force-pushed the stack/claude-code-direct-runtime branch from 4d9bde9 to 03623a6 Compare August 31, 2026 13:35
@chen-ran
chen-ran force-pushed the stack/claude-code-direct-runtime branch from 03623a6 to bcaec5c Compare September 1, 2026 20:09
The direct-runtime model catalog error panel rendered the literal
"common.retry" on its retry button because the key was never defined in
any locale.

The "is this the same staged draft?" comparison was copied three times
and had drifted: both copies in external-agent-staging.ts compared six
fields including sessionMode, while the pane-targeted matcher in
external-agent-orchestration.ts compared five and ignored it. A discuss
draft and a chat draft for the same agent could therefore be judged
identical by one path and different by the other. All three now route
through sameExternalAgentSessionInput, with a regression test covering
the target-aware and focused matchers together.
@chen-ran
chen-ran force-pushed the stack/claude-code-direct-runtime branch from 2dc3434 to b3f4076 Compare September 1, 2026 20:47
@chen-ran
chen-ran merged commit 7c33ea8 into main Sep 1, 2026
19 checks passed
sheepbox8646 added a commit that referenced this pull request Sep 2, 2026
Design for moving agent CLIs out of the workspace image contract into a
server-pinned, user-visible dependency manager, revised for the direct
Codex/Claude Code runtimes (#1110-#1112). The plan groups the work into
five stacked code PRs with per-PR file lists, tests and merge conditions,
and documents the gh-stack workflow used to land them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
chen-ran pushed a commit that referenced this pull request Sep 8, 2026
Design for moving agent CLIs out of the workspace image contract into a
server-pinned, user-visible dependency manager, revised for the direct
Codex/Claude Code runtimes (#1110-#1112). The plan groups the work into
five stacked code PRs with per-PR file lists, tests and merge conditions,
and documents the gh-stack workflow used to land them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
chen-ran pushed a commit that referenced this pull request Sep 8, 2026
Design for moving agent CLIs out of the workspace image contract into a
server-pinned, user-visible dependency manager, revised for the direct
Codex/Claude Code runtimes (#1110-#1112). The plan groups the work into
five stacked code PRs with per-PR file lists, tests and merge conditions,
and documents the gh-stack workflow used to land them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ
sheepbox8646 added a commit that referenced this pull request Sep 9, 2026
* docs(design): workspace dependency management design and stacked plan

Design for moving agent CLIs out of the workspace image contract into a
server-pinned, user-visible dependency manager, revised for the direct
Codex/Claude Code runtimes (#1110-#1112). The plan groups the work into
five stacked code PRs with per-PR file lists, tests and merge conditions,
and documents the gh-stack workflow used to land them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ

* docs(design): drop agent CLI pinning; model node/python/uv as image baseline plus overlay

Agent CLIs are managed like every other dependency (latest by default,
explicit version, upstream update checks, rollback); the server protocol
snapshot no longer drives any alignment. Runtime dependencies keep the
image copy as a baseline and may install a managed overlay that wins on
PATH; removing the overlay returns to the image version. Adds the PATH
precedence rule and the new stack layer for these changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ

* docs(design): record the dependency UI decisions and copy rules

Flat, installed-only list on the bot page; discovery and installation in
Supermarket via a bot-independent catalog endpoint; icons as icon-library
identifiers; the tab lives in the capability group; and the UI copy rules
(same shape and action set for every dependency, no provenance labels, no
limitation blurbs, localized names, optional version input).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017sihinqYWYNmZ9K842WqDJ

* docs: restore original workspace dependency design and plan

Restore the complete Chinese documents from 8767938 before they were condensed and the implementation plan was removed.

Model: gpt-6

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.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