Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_eventswith 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.scripts/wait-task.mjsto 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.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— passednpm run build:test— passedTMPDIR=/private/tmp node --test dist-test/test/wait-task.test.js dist-test/test/validate-plugin-root-pattern.test.js— 23 passed, 0 failednpm run build— passed; tracked bundles remain unchangednpm run validate:plugin— passedgit diff --check— passed; clean working tree after validationThe focused test run initially had one validator-fixture failure under the macOS
/tmpalias; using the canonical/private/tmptemporary directory resolved it without source changes. Fullnpm test, a live Claude Code/ZCode end-to-end run, and cross-platform/version certification were not rerun for this PR submission.