Skip to content

Never type into a pane whose agent's program has ended; a start its usage window ends waits for it - #30

Merged
jbutton merged 1 commit into
mainfrom
fix/no-typing-into-shell
Nov 16, 2026
Merged

jbutton merged 1 commit into
mainfrom
fix/no-typing-into-shell

Conversation

@jbutton

@jbutton jbutton commented Nov 16, 2026

Copy link
Copy Markdown
Owner

On 16 Nov Codex's week was used up while usage.extra defer was on. Two tasks that were starting at that moment had their program end as it came up. The board typed their instructions into the zsh left behind, where the lines ran as commands (cd: too many arguments, zsh: no matches found). The rows then said "Not started: its instructions sit unsent in its box" instead of "waiting for the usage window".

What changes

  • Nothing is typed into a shell. hand asks herdr what runs in the pane before it types. If no agent is named there, or the pane's shell is back in front (Herdr::shell_in_front; herdr can name the agent for a moment after its program exits), it types nothing and fails with agent_gone. settle stops waiting at that point, and enter is never pressed again into a shell. This covers every sender: a task's agent, the Coordinator, the reviewer and attempts.
  • A start that its usage window ends waits for that window. The text is kept for the next start. Under defer, the program's window is read afresh. If it is used up or on extra usage, the task is stopped the same way as one at work (waiting for the usage window: resets …) and carries on with its own text at the reset (submit/gone.rs). Otherwise it fails as "Not started: its program ended before it was given its instructions", and retry starts the program again.
  • The gate catches it earlier. Under defer, a queued task is now also held back when its window is used up (hard), not only on extra usage. Codex's window is read afresh before a start instead of once a minute.
  • The fake herdr is closer to the real one. An agent alone in its pane is now the pane's foreground. exitsAtStart ends a program at its start while herdr still names the agent.

Tests

tests/submit/gone.rs has four tests: nothing typed after a program ended at its start; no enter pressed into the shell after a program ended with its text in the box; under defer, a start ended by its window waits and carries on at the reset; a window known to be used up holds the start back. All four fail without the fix.

npm run check passes: 1396 tests and the repo's rules. Clippy shows no new warnings. Two older usage tests (usage::ask::…changed_to_defer… and usage::defer::…out_of_allowance…) are flaky on main too when run with the whole suite. They passed in this run.

🤖 Generated with Claude Code

…sage window ends waits for it

On 16 Nov Codex's week was used up under `usage.extra defer`. Two tasks starting at that moment had their program end
as it came up, and the board typed their instructions into the zsh left behind (where lines ran as commands), then
showed "Not started" instead of waiting for the window.

- `hand` types nothing when herdr names no agent in the pane or the pane's shell is back in front
  (`Herdr::shell_in_front`), and fails with `agent_gone`; `settle` and the enter pressed again stop there too.
- A text not typed for that is kept for the next start; under `defer`, with the program's window used up or on extra
  usage (read afresh), the task is stopped as one at work is and carries on at the reset (submit/gone.rs). Otherwise
  it fails as not started, and retry starts the program again.
- The start gate holds a task back under `defer` when its window is used up (`hard`), not only on extra usage, and
  reads Codex's window afresh before a start.
- The fake herdr shows an agent alone in its pane as the pane's foreground, as real herdr does, and can end a program
  at its start while still naming the agent (`exitsAtStart`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jbutton
jbutton merged commit bd390f7 into main Nov 16, 2026
4 checks passed
@jbutton
jbutton deleted the fix/no-typing-into-shell branch November 16, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant