Skip to content

Let executors read the skill, close their own window and clear in-review - #28

Merged
dinoderek merged 2 commits into
mainfrom
fix/executor-skill-access-and-session-end
Oct 24, 2026
Merged

dinoderek merged 2 commits into
mainfrom
fix/executor-skill-access-and-session-end

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

Objective

Problems found running BOGA3#881 hands-off with engine start:

  • Executors that read the skill's references with Claude's Read tool stopped on the "read outside the working directories" prompt. This happened to #883 and #885.
  • Finished sessions kept their windows, and so their slots.
  • Closed tasks kept engine:in-review.

This PR fixes all three:

  • engine start passes --add-dir <engine plugin dir> -- <kickoff>.
  • The executor skill (plugin 0.3.2) clears engine:in-review after the merge. In hands-off mode, it closes its own tmux window as its last action.

Gates

Lane Result Evidence
./dev test (every required lane) PASS format, vet, lint, unit, coverage, file-length, imports, versions, docs-check all PASS on b3764a9
  • New or changed tests:
    • internal/session/trust_test.go TestPluginDir: the plugin dir under ~/.claude and under $CLAUDE_CONFIG_DIR.
    • internal/session/trust_test.go TestMarketplaceMatchesItsFile: session.Marketplace matches .claude-plugin/marketplace.json, so a rename can't silently point --add-dir at a missing dir.
    • internal/start/start_test.go TestLaunchCommand: --add-dir <quoted dir> -- comes before the kickoff, with and without CLAUDE_CONFIG_DIR.
    • internal/start/integration_test.go TestRealStart: the fake claude receives --add-dir, the dir, -- and the kickoff as separate argv entries.
  • Not run, with reason: none. Checked by hand in throwaway tmux sessions:
    • an interactive auto-mode Read of the skill prompts without --add-dir and goes through with it;
    • claude … --add-dir X -- '<prompt>' still receives the prompt;
    • an auto-mode session can run tmux kill-window -t "$TMUX_PANE" and its window closes.

Rulings

Ruling (risk: med): use --add-dir on engine's plugin cache directory, not a read-only allow rule.
Why: --add-dir is confirmed to remove the prompt. A Read(...) allow rule may not get past this check (untested). The cost is that sessions can also write to the plugin cache, including the cached hooks.json that installs the merge guard. An edit there would not change the running session, but would disable the guard for later sessions on that host. This is a security trade-off for the operator to confirm.
If wrong: swap the flag for a read-only allow rule in internal/start/start.go command(). One line plus its tests.

Ruling (risk: low): a hands-off executor closes its own window (cd "$HOME" && tmux kill-window -t "$TMUX_PANE", re-run if the shell reports a deleted cwd). The coordinator's release closes it only if it is still open.
Why: an interactive Claude session cannot exit by itself, and engine run does not exist yet, so nothing else frees the slot. A gated session stays open because the operator reads it.
If wrong: remove the sentence from step 12 of execute.md.

Review

Deviations

None. docs/hosts-and-sessions.md stays within its 2000-word budget (1999 words) by trimming, with no budget change.

🤖 Generated with Claude Code

dinoderek and others added 2 commits October 24, 2026 16:25
engine start now passes --add-dir with engine's plugin directory, so an
executor that reads the skill's references with Claude's Read tool is not
stopped by the "read outside the working directories" prompt. The kickoff
follows --, since --add-dir is variadic.

The executor skill (plugin 0.3.2) removes engine:in-review once the merge
closes the task, and a hands-off executor ends by closing its own tmux
window, which frees its slot. A gated one leaves the window for the operator.

Found running BOGA3#881: two of five sessions stalled on the read prompt,
finished sessions held their slots, and closed tasks kept engine:in-review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e name, keep docs true

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dinoderek
dinoderek merged commit 28785bf into main Oct 24, 2026
1 check passed
@dinoderek
dinoderek deleted the fix/executor-skill-access-and-session-end branch October 24, 2026 20:53
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