Repository navigation
Conversation
Port the acq acp subcommand (ADR-0040, first proposed as a Bash patch in #696) onto the Python implementation, as the maintainers asked. It runs a sandboxed agent's Agent Client Protocol server over raw stdin/stdout so an IDE such as Zed can use acq as its agent command. - add commands/acp.py: CleanStdio sends fd 1 to fd 2 and binds fd 0 to the null device for the prologue, then restores both before the launch; the prologue runs with ACQ_NO_PROMPT=1 and ACQ_UPDATE_CHECK=0; shell and --json are refused - add stream_command to the msb (exec --stream) and sbx (exec -i) adapters; never -t - give lifecycle.run_run an optional launch argument so acp reuses the create-or-reattach, heal and key-check path instead of copying it - wire the verb into cli: known commands, parser, dispatch, mutating set, -- split - add ADR-0053m (proposed), the how-to section, 29 tier-2 tests and 3 tier-1 vectors Binding stdin to the null device is what protects the client's pipe: the provider-credential prompt only checks that stdin is a terminal, not ACQ_NO_PROMPT. Merging touches the Tier-3 surface, so it needs live re-qualification (ADR-0044m). The real msb --stream and sbx -i have not been exercised; the tests use the stubs. Co-authored-by: OpenCode [claude-sonnet-5.5] <John.Jediny@gsa.gov>
This was referenced Nov 13, 2026
Member
Author
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.
AI-assisted: written with OpenCode (claude-sonnet-5.5) under the direction of the responsible human, who has not yet reviewed it. Needs human review before merge.
Context
acq acpruns a sandboxed agent's Agent Client Protocol (ACP) server over raw stdin/stdout so an IDE such as Zed can useacqas its agent command. It was first proposed for the Bashacqin #696. The maintainers asked for it to wait for the Python rewrite, so this is the port ontomigration/python-cross-platform(#697). The base branch is notmain, on purpose.Plan
commands/acp.py(new):CleanStdiosends fd 1 to fd 2 and fd 0 to the null device for the prologue, then restores both before the launch.ACQ_NO_PROMPT=1andACQ_UPDATE_CHECK=0are set for the prologue only.shelland--jsonare refused.msb.py/sbx.py: newstream_command(msb exec --stream,sbx exec -i, never-t).lifecycle.py:run_runtakes an optionallaunchargument (defaultNone), soacpreuses the create-or-re-attach, heal and key-check path instead of copying it.cli.py: known commands, parser, dispatch, mutating set,--split.proposed), a how-to section, 29 Tier-2 tests, 3 Tier-1 vectors.Binding stdin to the null device is what protects the client's pipe. The provider-credential prompt only checks that stdin is a terminal, not
ACQ_NO_PROMPT.Verification
tests/test_acp.py: 29 passed. Four deliberate breakages (stdin not bound, fd 1 not redirected, prompts not disabled,--streamdropped) each fail a named test.requirements-quality.txt.py-acqsuite: 3448 passed, 101 skipped, 59 failed. All 59 also fail on an unmodified checkout of the base branch: 52 rungit commitwhere signing is mandatory and no key is loaded (51 of them pass with signing off), 5 need a short directory with 6 GB free under/tmp, and 2 are intest_create_config_settings.pyandtest_provider_input.py. I did not diagnose those last two or the one signing-off failure.Not verified
msb exec --streamandsbx exec -iwere not run; the tests use the stubs. A live ACP exchange (Tier 3) has not been done.markdownlintis not installed where this was written).scripts/run-vectorswas not run; only the pytest runner was.KNOWN_FAILURE_MODES.mdentry: the Bash change's entry number does not map onto this branch.Rollback
Revert this commit.
run_run's new parameter defaults toNone, so no other caller changes.Security impact
Adds a verb that launches an agent with stdio attached. It adds no credential handling and no new network path. It lowers prompt exposure by refusing to prompt. Merging touches
py-acq/src/acq_py/, which is on the Tier-3 surface, so it expires the live qualification transcripts (ADR-0044m) and needs a re-qualification run.Notes for review
AGENTS.mdform.AGENTS.fork.mdasks for "AI-assisted" only on the fork; adjust if that applies here.