Repository navigation
Replies: 1 comment
|
Thanks @aakhter for taking this to a Discussion, and sorry for the wait. Short version: yes, an experimental label answers the stability concern, and the three dedicated routes can stay as they are. Before merge, I'd like one change: put them behind an opt-in setting. The label is already in the policy. Dedicated routes are the right shape. Opt-in. When Codeman ships an opt-in server surface, it is usually a synced setting, default OFF, whose routes answer What the label covers. It covers the three verbs and their routes. The changes underneath them run for every session, so I'll review those as stable behavior: the input revision tracking in Before promotion to stable, the guard should stop depending on Codex internals. Today it is gated on Wiki page. Once the setting is in, together with the five small items from my last review on #694 (the wiki link is one of them), I'll do the next review pass there. |
Uh oh!
There was an error while loading. Please reload this page.
Following the design request on PR #694, I propose shipping the three new agent operations as experimental, across both the CLI verbs and HTTP routes. The PR now explicitly documents the stability exception, including the
/api/v1paths and their/apialiases. This avoids committing to their final shape while we gain usage experience.The use case is an agent coordinating another Codeman session: read a bounded amount of evidence, prepare a prompt without Enter, inspect it, then submit that exact prompt once. Existing
send,read, andwaitremain useful, but they do not provide a resumable evidence cursor or a server-checked receipt binding preparation to submission.Proposed contract
GET /api/v1/sessions/:id/inspectPOST /api/v1/sessions/:id/stagePOST /api/v1/sessions/:id/submitInspection uses strictly attributed local Codex JSONL where available and an explicitly labeled, nonincremental pane snapshot otherwise. Native attribution proves the evidence file's identity; it does not claim authoritative tracking of an in-CLI thread switch. Cursors expire and can be invalidated by source or lifecycle changes. Resizing alone should not invalidate an inspection cursor.
Stage/submit initially support only a recognizable, unwrapped local Codex composer. They refuse uncertain captures, active work, modal screens, remote/container sessions and unsupported modes. Width is checked before typing. Receipts hold hashes and ephemeral identity, not prompt content. A receipt is consumed on any owned submit attempt, including a refusal or ambiguous failure. Success means Enter was dispatched once; it does not prove that the native CLI accepted or completed the request. There is no automatic submission retry.
Recovery is part of the contract: a stage failure or refused/ambiguous submit may leave an unsent draft. Receipts cannot be reused, and ordinary
sendappends to and submits existing composer text. Inspection may return JSONL rather than the unsent composer, so recovery requires a fresh terminal capture. Only a definitely unsent, fully visible, input-ready draft with exclusive writer access may be cleared through the existing raw input path without Enter (or manually), followed by verification that the composer is empty and a fresh stage. An accepted, working, modal or uncertain state must be observed rather than replayed. There is currently no guarded cancel operation.The three operations share existing authentication and ownership checks. The CLI remains an HTTP client; there is no additional transport or direct tmux fallback in the client. Inspection output and pane text remain observations, never authorization.
Proposed experimental scope
The new
codeman agent inspect,stageandsubmitverbs, their flags, the three route paths, payloads and behavior may change or be removed in minor or patch releases. Callers should pin a compatible Codeman version. Existing authentication, ownership and shared response-envelope rules continue to apply; existing agent commands and other API routes keep their current stability guarantees. Promotion to stable requires an explicit documented decision.I propose retaining the dedicated routes for the experimental phase: bounded evidence and a two-phase receipt lifecycle have different validation and failure semantics from ordinary input. There is no additional feature flag in this proposal; the CLI help, README, API reference, versioning policy and packaged skill all identify the experimental scope.
Does this experimental boundary address the API concern, or would you prefer a different route organization before merge? The PR leaves these paths available for revision rather than treating them as a stable contract.
The implementation and tests are in PR #694. All concrete correctness findings from the review are addressed; the previous full suite passed 12,372 tests with 12 skipped. The latest follow-up only labels and documents the experimental contract and updates CLI help.
All reactions