Backlog
Labels
Description
Problem
Claude Code's Bash tool executes commands non-interactively and does not expose a native, stateful PTY session handle for interactive CLIs, REPLs, debuggers (gdb/pdb/lldb), or line-prompted maintenance tools (fsck-style confirmation loops).
In our containerized evaluation of Claude Code 2.1.332 across 95 tasks on TraceTrial-Bench (arXiv:2610.32285), Claude Code scored 80.4% across Execution (E) overall, but interactive PTY tasks were the single sharpest drop in Execution:
| Task | Agent Score | Harness Score | Observed Behavior (2.1.332) |
|---|---|---|---|
E9-ptyfsck-001 |
50.0% | 25.0% | No real interactive PTY handle; line prompts and post-EOF completion were not observable to the model |
E9-ptyrepl-002 |
50.0% | 25.0% | Interactive REPL prompt and follow-up output after EOF were not reliably captured |
Proposed Feature
Expose a native interactive PTY tool (e.g., PtyStart / PtyWrite / PtyRead / PtyClose, or an interactive session mode on Bash) that provides:
- A persistent session handle attached to a real pseudo-terminal (
isatty() == true); - Incremental prompt-aware reads (returning partial line prompts without requiring a trailing newline);
- Explicit EOF (
Ctrl-D) / signal (Ctrl-C) delivery with clean exit-status and trailing-output capture.
Reproducibility
- Benchmark & Docker adapter: https://github.com/TraceLite-AI/TraceTrial-Bench
- Tasks:
E9-ptyfsck-001,E9-ptyrepl-002 - Tested version:
@anthropic-ai/claude-code@2.1.332
Activity