Skip to content

fix(delivery): retain unknown outcomes for incomplete SSH and Codex sends #263

Closed

Description

@abruption

What happened

Priority: P1. Some potentially post-submission SSH/Codex failures lack structured unknown-outcome and no-retry information, although other timeout paths already expose it.

Source:

Isolated mocked subprocess results:

  • SSH exit 255 with empty stdout: error details contain only sshFailure=transport_failed.
  • SSH exit 137 with empty stdout, or exit 0 with truncated JSON: details lack structured unknown/no-retry fields.
  • Codex queue TimeoutExpired: error text mentions unknown, but structured details are empty.

These cases do not establish that no native submission occurred. Missing retryAllowed must not be interpreted as permission to resend.

What you expected

A send with a possible effect and no trustworthy complete outcome should conservatively expose status=unknown, a fixed outcome reason and retryAllowed=false. Preserve any independently valid completed response and native submission facts.

Environment

  • Baseline: Python session-peer 1.0.3 / source 817d92ab780f657ec754d40fcf86087b5b01a883.
  • macOS arm64, Python 3.13.7.
  • External subprocesses mocked; no actual remote command, native message, retry, or duplicate delivery was performed.
  • This tracks ordinary send outcome classification, not the unimplemented ACK/wait contract.

Discovery output

Not applicable to isolated response/error classification.

Proposed fix and acceptance criteria

  • Distinguish proven pre-effect rejection from possibly post-effect failure; never infer no effect merely from an ambiguous diagnostic string.
  • Preserve complete success/refusal stdout on nonzero SSH exit or transport shutdown timeout.
  • Cover exit 255/137 with no response, truncated/malformed response, and local Codex queue timeout.
  • Keep protocol stdout validation strict and invalid UTF-8 diagnostic stderr harmless to valid stdout.
  • Preserve current authentication/host-key diagnostics and legacy agent-specific optional field absence where applicable.
  • Do not add automatic retry/fallback or manufacture submitted=false when the effect is unknown.
  • Keep ordinary opt-out JSON/exit compatibility and update fixed-contract fixtures only where required.

Related work

Follow-up to closed #228 (preserving complete in-band responses), not a duplicate of it. #181 remains separate feature/design work; #182 native dedup is not a prerequisite for this bounded correction.

Checked

  • Searched existing issues and open PRs.
  • Removed sensitive information; subprocess outputs are synthetic.
  • Real SSH connectivity/inbound approvals were not changed or tested.

Activity

  1. added this to the v1.0.4 milestone on Oct 7, 2026
  2. added
    bug
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions