Skip to content

feat: support Claude Code as a host with a read-only task waiter - #49

Open
Han7872 wants to merge 1 commit into
Sandyzzx:masterfrom
Han7872:claude/claude-code-host-v1.2.7
Open

Han7872 wants to merge 1 commit into
Sandyzzx:masterfrom
Han7872:claude/claude-code-host-v1.2.7

Conversation

@Han7872

@Han7872 Han7872 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Claude Code can connect to the Bridge through MCP, but the skill assumes a Codex host and long waits require repeated calls to zcode_events with its 25-second limit. This adds a read-only waiter that Claude Code can run in the background and host-specific guidance for resuming when attention is needed.

  • Add scripts/wait-task.mjs to the plugin, using only Node built-ins. It reads task status and event logs, exits for a pending interaction, a terminal status, or a deadline, and never writes Bridge state.
  • Make the skill host-neutral, document Claude Code background waiting and the absence of Goal support, and retain the existing Codex Goal rules.
  • Add ADR-010, interface documentation, waiter regression tests, and plugin validation for the packaged waiter and its imports.

MCP tool names, schemas, task state semantics, and runtime dependencies remain unchanged. The waiter provides observations only; interaction decisions and task acceptance still go through the existing host workflow. This does not add or claim a tested Claude Code plugin installation manifest.

Validation

Independently run on macOS with Node.js v26.5.0 against commit 13ab83626a7fa7f35319a21244215c2915ecb112:

  • npm run typecheck — passed
  • npm run build:test — passed
  • TMPDIR=/private/tmp node --test dist-test/test/wait-task.test.js dist-test/test/validate-plugin-root-pattern.test.js — 23 passed, 0 failed
  • npm run build — passed; tracked bundles remain unchanged
  • npm run validate:plugin — passed
  • git diff --check — passed; clean working tree after validation

The focused test run initially had one validator-fixture failure under the macOS /tmp alias; using the canonical /private/tmp temporary directory resolved it without source changes. Full npm test, a live Claude Code/ZCode end-to-end run, and cross-platform/version certification were not rerun for this PR submission.

Claude Code has no Goal tool and is notified when a background command
exits, so polling zcode_events in 25-second slices costs a host tool call
per slice. Add plugins/codex-zcode-bridge/scripts/wait-task.mjs: a
dependency-free reader of status.json/events.jsonl/events.gen that exits
on an unanswered interaction, a terminal status, or a deadline, and never
writes Bridge state (observation only, ADR-004/ADR-010).

Make the skill host-neutral with a Claude Code section, document the
waiter in INTERFACES.md and ADR-010, and have validate:plugin require the
waiter and reject non-builtin imports. MCP tools, schemas and task state
semantics are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AND5VcsL1v2kDgRUmQGjtQ
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.

1 participant