Skip to content

Commit 36b3a09

Browse files
committed
ROADMAP ultraworkers#139: claw state error references undocumented 'worker' concept (unactionable for claws)
1 parent f3f6643 commit 36b3a09

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

ROADMAP.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5171,3 +5171,55 @@ Nudge surface should report explicit state + timestamp: `"feat/134-135 state=pus
51715171
- Means closure-state tracking must live inside the repo (ROADMAP) or in an external surface (Discord message edits, `.dogfood-closure.json`)
51725172

51735173
**Filed:** 2026-04-21 15:05 KST as evidence for #138 by Jobdori dogfood loop.
5174+
5175+
## Pinpoint #139. `claw state` error message refers to "worker" concept that is not discoverable via `--help` or any documented command — error is unactionable for claws and CI
5176+
5177+
**Gap.** `claw state` (both text and JSON output modes) returns this error when no worker-state.json exists:
5178+
```
5179+
error: no worker state file found at /private/tmp/cd-16/.claw/worker-state.json — run a worker first
5180+
```
5181+
5182+
**The problem:** "worker" is a concept that has **zero discoverability path** from the CLI surface:
5183+
1. `claw --help` has no mention of workers, `claw worker`, or worker state
5184+
2. There is no `claw worker` subcommand (not listed in help, not in the 16 known subcommands)
5185+
3. No hint in the error itself about what command triggers worker state creation
5186+
4. A claw, CI pipeline, or first-time user hitting this error has no actionable next step
5187+
5188+
**Verified on main HEAD `f3f6643` (2026-04-21 15:58 KST):**
5189+
```
5190+
$ claw state --output-format json
5191+
{"error":"no worker state file found at /private/tmp/cd-16/.claw/worker-state.json — run a worker first","type":"error"}
5192+
```
5193+
5194+
**Trace path.**
5195+
- `rust/crates/rusty-claude-cli/src/main.rs` — `handle_state()` or equivalent returns this error when `.claw/worker-state.json` is missing.
5196+
- No internal documentation on what produces `worker-state.json` (likely background worker session, but not surfaced)
5197+
- `claw bootstrap-plan` mentions phases like `DaemonWorkerFastPath` and `BackgroundSessionFastPath` — suggesting workers are part of daemon/background execution — but this is internal architecture jargon, not user-facing
5198+
5199+
**Why this is a clawability gap.**
5200+
1. **Error references concept that is not discoverable.** Product Principle violation: "Errors must be actionable." Current error is descriptive but unactionable.
5201+
2. **Claws can't self-heal.** A claw orchestrator that gets this error cannot construct a follow-up command because the remediation is not in the error or in `--help`.
5202+
3. **Dogfood blocker.** Automated test setups that include `claw state` as a health check will fail silently for users who haven't triggered the worker path.
5203+
4. **Internal architecture leaks into user surface.** The `worker` / `daemon` / `background session` distinction is internal runtime nomenclature, not user-facing workflow.
5204+
5205+
**Fix shape (~20-40 lines).**
5206+
1. **Error message should include remediation.** Change error to:
5207+
```json
5208+
{
5209+
"error": "no worker state file found at <path> — run `claw` (interactive REPL) or `claw prompt <text>` to produce worker state",
5210+
"type": "error",
5211+
"hint": "Worker state is created when claw executes a prompt (REPL or one-shot). If you have run claw but still see this, check that your session wrote to .claw/worker-state.json.",
5212+
"next_action": "claw prompt \"hello\""
5213+
}
5214+
```
5215+
2. **Add `claw --help` reference.** Document under `Flags` or `Subcommand overview` that `claw state` requires prior execution.
5216+
3. **Consistency with typed-error envelope** (ROADMAP §4.44): include `operation: "state-read"`, `target: "<path>"`, `retryable: false` fields for machine consumers.
5217+
5218+
**Acceptance.**
5219+
- `claw state` error text explicitly names the command(s) that produce worker state
5220+
- `--help` has at least one line documenting the state/worker relationship
5221+
- A claw reading the JSON error gets a structured `next_action` field
5222+
5223+
**Blocker.** None. Pure error-text + doc fix. ~30 lines.
5224+
5225+
**Source.** Jobdori dogfood 2026-04-21 16:00 KST on main HEAD `f3f6643`. Joins **error-message-quality** cluster (related to §4.44 typed error taxonomy and §5 failure class enumeration). Joins **CLI discoverability** cluster (#108 did-you-mean for typos, #127 --json on diagnostic verbs). Session tally: ROADMAP #139.

0 commit comments

Comments
 (0)