Feature request: programmatic orchestration API for external harnesses
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Context
Evaluating jcode as a backend for an external multi-agent orchestrator (managing N concurrent coding sessions across projects, with session lifecycle, telemetry, and cross-harness resume).
The cross-harness session resume + multi-provider OAuth surface is exactly what an orchestrator wants. But to drive jcode from outside, a stable programmatic API is needed beyond the interactive TUI.
Ask
Document (or expose, if not yet present) a stable non-interactive surface covering:
- Spawn / attach / detach — start a session headlessly with a provider profile + working directory + initial prompt, return a session ID, allow re-attach later.
- Session inventory — list active + resumable sessions with provider, model, cwd, last-active timestamp, token/cache state.
- Resume by ID — including the cross-harness resume already advertised (codex / claude-code / opencode / pi). What's the CLI / JSON contract?
- Streaming I/O — stdout/stderr/events as JSON lines or a websocket, so an orchestrator can render transcripts without scraping the TUI.
- Cache-cold signal — the warning surfaced in the UI exposed as a structured event, so external schedulers can avoid waking sessions past the 5-min Anthropic TTL.
- MCP passthrough — confirm whether
~/.jcode/mcp.jsonservers are available to spawned sessions in headless mode.
Why it matters
Without these, integrators have to shell-scrape, which defeats the perf wins. With them, jcode becomes a viable engine for orchestrators (Octogent-style dashboards, CI agents, IDE plugins) rather than only a human-facing TUI.
Happy to test against a draft spec.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing jcode's existing TUI and any non-interactive CLI surface, then map the requested session lifecycle, inventory, resume, streaming, cache-cold, and MCP behavior. Clarify whether the work is documentation or implementation, define the CLI/JSON contract and structured events, and verify how ~/.jcode/mcp.json behaves for headless sessions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100