mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
The readiness gate matched `bypass`, which is the status bar of ONE permission mode. `buildPermissionArgs()` also spawns `--permission-mode auto`, `--allowedTools` and plain `normal`, and the mode is not exposed on `GET /api/v1/sessions/:id`, so an agent cannot know which token to expect. A non-default worker was therefore reported broken after burning the whole ladder. Measured one pane per mode against claude-cli 2.1.226: --dangerously-skip-permissions -> "bypass permissions on" --permission-mode auto -> "auto mode on" --allowedTools Read,Grep -> "don't ask on" (none, normal) -> "don't ask on" --permission-mode plan -> "plan mode on" Every one ends `(shift+tab to cycle)`, so `shift+tab` is the single space-free token that means "the composer is up" in every mode, and it is what the ladder matches now. Verified live end to end on a virgin case: stage 1 misses while the trust dialog is up, stage 2 accepts it, stage 3 matches in 623ms. ⚠️ `shift+tab` contains a `+`, so it only works through `--data-urlencode`. In a hand-built query the `+` decodes to a space and the server searches for `shift tab`, which never appears; the response echoes `match: "shift tab"`, which is how to spot it. Measured both ways. The stage-4 fallback (make the worker echo a split token, proving readiness by answering rather than by chrome) stays as the last resort, and is now also verified live: it matched in 2.5s, with the token surviving the space-less TUI intact. Also portable ANSI stripping: the read pipelines used `sed 's/\x1b...'`, and BSD sed (the macOS default) has no `\xHH` escape, so on macOS the strip silently removed nothing and handed the agent raw ANSI. They now build a real ESC with `printf`. And endpoints.md gaps: the `FORBIDDEN` 403 row and which auth responses are plain text rather than the JSON envelope, the input size cap, the undocumented `killMux` parameter on DELETE, and the fact that zero/negative/non-integer timeouts are rejected with a 400 rather than clamped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>