Skip to content

enhancement(tools): structured shell output envelope — {stdout, stderr, exit_code} schema #2488

@bug-ops

Description

@bug-ops

Source

Competitive parity: Goose v1.27.0 — enforces structured {stdout, stderr} JSON schema for all shell tool output.

Gap

Zeph's ShellExecutor returns raw combined output string. Ambiguous parsing when stderr is interleaved with stdout; silent failures if tool writes error to stderr but exits 0.

Zeph applicability

  • Structured envelope would improve tool poisoning detection (adversarial content in stderr vs stdout has different trust levels)
  • Multi-agent chain parsing: downstream orchestrator can reliably extract exit_code without parsing
  • Transactional shell rollback already tracks exit codes — structured output is a natural complement
  • Implementation sketch: wrap ShellOutput as { stdout: String, stderr: String, exit_code: i32, truncated: bool }; emit as JSON in tool result; update AuditResult to store structured fields

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions