Robust tmux orchestrator/worker targeting under any config + tolerant tasks.json parsing #4
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/superharness!4
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/tmux-targeting-and-tasks-robustness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two related robustness fixes so superharness behaves correctly under real-world
tmux configurations and tolerates the freeform
tasks.jsonthe orchestrator writes.1. Robust tmux orchestrator/worker targeting (
fix)superharness hardcoded a
superharness:0window and%0orchestrator pane. Underany non-default tmux config —
base-index != 0, an embedded session, window reorg,or break-pane — those targets were wrong, producing
can't find window: 0/can't find pane: %0failures, scanning and stealing user-created windows, and —worst — a finishing worker tearing down the entire session.
@sh_orchestrator/@sh_worker, so targeting survives base-index, embeddedsessions, reorg, and break-pane. Replaces the hardcoded
superharness:0/window_indextargets across the spawn, layout, min-pane-size, and terminal-size paths.now act only on
@sh_worker-tagged panes, so user windows are never scanned,surfaced, or stolen.
orchestrator_pane_id()with validated fallbacks(pane tag → echo-back-validated env var → lowest pane id) instead of a literal
%0.$TMUX_PANE(guarded against an emptyvalue) instead of an untargeted
tmux display-message -p '#{pane_id}', whichresolved to the active (orchestrator) pane and crashed the whole session when a
worker finished.
AGENTS.mdtemplate (assets/agents_template.md) to documentthe tagging + dynamic resolution and drop its hardcoded
%0references.2. Tolerant tasks.json parsing (
feat)The orchestrator writes
tasks.jsonfreeform, so the tasks modal and theplanning-mode bootstrap now accept either top-level shape:
{ "tasks": [ ... ] }wrapper object, or[ ... ]array.Empty / missing / null content is treated as "no plan yet" so planning mode opens,
and the planning prompt now spells out the wrapper form so new plans are written canonically.
Testing
base_index,toggle_mode,worker_exit. Each reproduces its original bug, then proves the fix. Theworker_exittest runs against a throwaway tmux server (unsetTMUX, freshTMUX_TMPDIR, dedicated-Lsocket) so it can never touch the user's real session.Pull request closed