Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ The version is carried in `pyproject.toml` and `src/assistant/__init__.py`
- Add an attention overview with compact task cards, expandable return notes,
and reminders to finish older pending work before starting another task.

### Changed
- `spawn-claude-workspace` no longer adds `--dangerously-skip-permissions`
for `engine=claude`. Child sessions use the `claude` alias, which runs in
auto mode, and the ready check waits for `auto mode on`.

### Fixed
- Bring the warm Slack session up again on Claude Code 2.1.303 and cmux 0.65.
Claude Code now writes several hundred KB of records right after each prompt,
Expand Down
13 changes: 7 additions & 6 deletions skills/spawn-claude-workspace/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ bracket number. Leave naming and color to the daemon.

### `claude`

- Launch via the login-shell `claude` alias PLUS an explicit `--dangerously-skip-permissions`. The alias may drift and drop the flag; adding it explicitly is idempotent and prevents an unattended session stalling on the first permission gate. The alias still supplies `--model`, `--add-dir`, etc.
- The command must run in a login shell so the alias expands: `zsh -lic 'claude --dangerously-skip-permissions'`.
- Launch via the login-shell `claude` alias. It runs `--permission-mode auto`, so the child gets the same auto-mode safety checks. Never add `--dangerously-skip-permissions`.
- The command must run in a login shell so the alias expands: `zsh -lic claude`.
- Run each cmux step as its own command, with nothing piped or chained around it.
- Do NOT hardcode `--model`/`--add-dir` — the alias owns them. Override `--model` only when the task genuinely needs a different tier.
- Claude transcripts: `~/.claude/projects/<project-slug>/<session-id>.jsonl`. `<project-slug>` is the cwd with every `/` replaced by `-` (leading `-` included). Sessions share one project dir; confirmation is a NEW jsonl appearing after spawn.
- Never fall back to Droid if Claude fails.
Expand Down Expand Up @@ -96,8 +97,8 @@ LAUNCH_CMD="droid --settings '$HOME/.assistant/droid-glm-settings.json' --auto h
if test -f "$HOME/.claude/CLAUDE.md"; then
LAUNCH_CMD="$LAUNCH_CMD --append-system-prompt-file '$HOME/.claude/CLAUDE.md'"
fi
# engine=claude (login shell so the alias expands; explicit dsp for unattended runs):
LAUNCH_CMD="zsh -lic 'claude --dangerously-skip-permissions'"
# engine=claude (login shell so the alias expands; the alias runs auto mode):
LAUNCH_CMD="zsh -lic claude"
OUT=$(cmux new-workspace --cwd "$CWD" --name "$TITLE" --focus false --command "$LAUNCH_CMD")
WS_REF=$(printf '%s' "$OUT" | grep -oE 'workspace:[0-9]+' | head -n1)
SURFACE_REF=$(cmux list-pane-surfaces --workspace "$WS_REF" | grep -oE 'surface:[0-9]+' | head -n1)
Expand All @@ -107,7 +108,7 @@ test -n "$WS_REF" && test -n "$SURFACE_REF"
5. Poll the whole screen until the engine is ready. Read 200 lines and accept an engine-appropriate marker:

- **droid**: `GLM-5.2`, `allow all commands`, `Skills (<n>)`, or `? for help`. Do not accept a Claude banner.
- **claude**: the Claude Code prompt box / `? for shortcuts`, `bypass permissions` (the dsp banner), or the model id `claude-opus`. Do not accept a Droid banner.
- **claude**: `auto mode on` in the footer. Do not accept a Droid banner or `bypass permissions on`.

```bash
READY=0
Expand All @@ -116,7 +117,7 @@ for _ in $(seq 1 30); do
# engine=droid:
if printf '%s' "$SCREEN" | grep -Eq 'GLM-?5\.2|allow all commands|Skills \([0-9]+\)|\? for help'; then READY=1; break; fi
# engine=claude:
if printf '%s' "$SCREEN" | grep -Eiq 'bypass permissions|\? for shortcuts|claude-opus|Welcome to Claude'; then READY=1; break; fi
if printf '%s' "$SCREEN" | grep -q 'auto mode on'; then READY=1; break; fi
sleep 1
done
test "$READY" = 1
Expand Down
Loading