1jehuang / 1jehuang/jcode

Feature request: programmatic orchestration API for external harnesses

Open
#144 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority: medium triage: needs-decision
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:

  1. Spawn / attach / detach — start a session headlessly with a provider profile + working directory + initial prompt, return a session ID, allow re-attach later.
  2. Session inventory — list active + resumable sessions with provider, model, cwd, last-active timestamp, token/cache state.
  3. Resume by ID — including the cross-harness resume already advertised (codex / claude-code / opencode / pi). What's the CLI / JSON contract?
  4. Streaming I/O — stdout/stderr/events as JSON lines or a websocket, so an orchestrator can render transcripts without scraping the TUI.
  5. 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.
  6. MCP passthrough — confirm whether ~/.jcode/mcp.json servers 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.