eval: refuse dead-session attach without restart - #42
Merged
myobie merged 2 commits intoJul 30, 2026
Conversation
agent-session-id: a078daee-6f98-4916-91a8-d21291407789 agent-tool: Codex CLI agent-tool-version: 0.145.0 agent-model: unknown agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@0fb7e03
schickling
marked this pull request as ready for review
July 30, 2026 08:30
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48498c9c47
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
agent-session-id: a078daee-6f98-4916-91a8-d21291407789 agent-tool: Codex CLI agent-tool-version: 0.145.0 agent-model: unknown agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@0fb7e03
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.
Why
A relay that intends to attach only to an existing PTY daemon can currently land on the dead-session
Restart? [Y/n]prompt. Later input intended for the target is then consumed as restart consent and evaluates retained launch metadata. This guards the explicit attach-only contract implemented by compoundingtech/pty#123 for issue compoundingtech/pty#122.Public reproduction: https://github.com/schickling-repros/2026-07-pty-attach-only-mode/tree/schickling-assistant/2026-07-30-pty-attach-only-mode
What
Add a model-free
pty-attach-onlycell using synthetic sessions in an eval-owned PTY root. It proves all three sides of the policy: attach-only works against a live daemon, legacy attach still demonstrates the dangerous dead-session restart, and attach-only refuses a dead daemon without interaction or a new incarnation.How
The held-out judges require:
--no-restarthelp surface, so an unknown-option error cannot fake safety;live-input->LIVE-ACK:live-input) with one incarnation;session_startevent after both candidate attaches;exitedstate without a matching live daemon;The generated catalog and model-free harness exclusion inventory are updated. No provider/model call is involved.
Verification
Against exact PTY PR #123 head
36547b02c32116cca81df4147a638da7df6981a5(PTY 0.12.0, artifact SHA-256406fbfcc6e292bcd178be15470e0fc8310ba1ddc35becbab25e0cffd0f096334):st2 eval ./cells/pty-attach-only/ --keep— PASS, 8 PASS / 0 FAIL / 8 gating judgesbin/check-kdl-parse.sh— PASS (67 KDL files)bin/check-st2-semantic.sh— PASS (44 folder evals, 9 nested catalogs)bin/check-harness-contract.sh— PASS (13 model-free cells)bin/check-overnight-policy.sh— PASS (44-cell inventory)bin/check-no-pii.sh/bin/check-no-pii-history.sh— PASSbin/generate-catalog.sh --check— PASSThe complete free preflight separately reaches the unchanged
inbox-hygienefixture-reset check, which currently reports deletedPROCESSED.log; the new cell-specific and downstream inventory/isolation gates above pass.Rationale
Keeping this model-free makes the lifecycle invariant deterministic, cheap, and suitable for every PTY/st2 integration change. The explicit live and legacy controls prevent vacuous refusal tests, while exact bounded terminal transcripts reject interactive confirmation variants.
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile