Compare commits

..

1 Commits

View File

@@ -6282,4 +6282,4 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
341. **Resume-safe `/tasks --output-format json` emits an unsupported-command JSON error only on stderr and mixes `kind` with `type` classification vocabularies** — dogfooded 2026-04-29 for the 16:00 nudge on current `origin/main` / rebuilt `./rust/target/debug/claw` with embedded `git_sha` `58569131`. Running `./rust/target/debug/claw --resume latest /tasks --output-format json` wrote no stdout bytes, but wrote a JSON error object to stderr: `{"command":"/tasks","error":"/tasks is not yet implemented in this build","kind":"unsupported_command","type":"error"}`. The unsupported command envelope therefore has two separate top-level classification vocabularies (`kind=unsupported_command` and `type=error`) and places the only parseable payload on stderr, while successful JSON commands use stdout and a `kind`-only classification. This is distinct from #340 because it is not session help; it shows implemented-but-unsupported command stubs can emit a dual-vocabulary error envelope. **Required fix shape:** (a) in `--output-format json` mode, emit the primary JSON envelope on stdout for unsupported resumed slash commands such as `/tasks`; (b) document and use one error discriminator, preferably `kind:"error"` plus `code:"unsupported_command"`, or `kind:"unsupported_command"` plus `status:"error"`, but not `type`; (c) reserve stderr for non-primary diagnostics or text-mode prose, never as the sole JSON payload; (d) add regression coverage for `/tasks` under `--resume` with JSON output proving stdout contains the structured error envelope, stderr is not the only parseable stream, and the envelope uses the documented single-vocabulary discriminator. **Why this matters:** claws need the same stdout JSON contract for implemented successes and implemented-but-unsupported stubs. If `/tasks` errors can silently move to stderr and advertise both `kind` and `type`, automation must special-case command stubs instead of applying one JSON error parser. Source: gaebal-gajae dogfood follow-up for the 16:00 nudge on rebuilt `./rust/target/debug/claw` `58569131`.
351. **`/cost --output-format json` returns only token counts, not a dollar-amount cost figure; `/cost` and `/stats` produce identical JSON payloads differing only in `"kind"`** — dogfooded 2026-04-30 by Jobdori on `f65b2b4`. Running `claw --output-format json --resume latest /cost` returns `{"kind":"cost","cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":0,"output_tokens":0,"total_tokens":0}`. There is no `total`, `cost_usd`, `cost`, or `currency` field. The command is named `/cost` which implies a monetary figure; an orchestration lane budgeting API spend cannot use this command to check whether a spending threshold has been reached. Additionally, `diff`ing `/cost` vs `/stats` output (minus `kind`) returns no differences — the two commands are functionally identical, which means either `/cost` should add monetary fields to justify its existence, or the two commands should be merged with a single canonical name. **Required fix shape:** (a) add `cost_usd` (or `cost` + `currency`) to `/cost --output-format json` output so callers can programmatically check spend; (b) if token→cost conversion requires a model-specific rate table, expose the rate used (e.g. `"rate": {"input_per_mtok": 3.0, "output_per_mtok": 15.0}`) so callers can verify or override the calculation; (c) if `/stats` is intentionally distinct, document how it differs from `/cost` in `/help --output-format json`; if they are truly equivalent, deprecate one and point to the other; (d) regression coverage proving `/cost --output-format json` includes at minimum a `cost_usd` or equivalent field. Source: Jobdori live dogfood, mengmotaHost, `f65b2b4`, 2026-04-30.
345. **`claw status --output-format json` and `/status --output-format json` do not include the active session ID in the JSON output, and `workspace.session_id` is always `null` even when resumed with `--resume latest`** — dogfooded 2026-04-30 by Jobdori on `5856913`. Running `claw --output-format json --resume latest /status` returns `workspace.session_id: null` and `workspace.session: "live-repl"` — impossible to confirm which session is active from `status` output alone. Also `workspace.changed_files: 3` while `staged_files: 0, unstaged_files: 0, untracked_files: 3` — if `changed_files` counts only tracked changes it should be 0; if it counts everything it duplicates `untracked_files`. Counter semantics are ambiguous. **Fix:** populate `workspace.session_id` when resumed; clarify `changed_files` vs `staged+unstaged+untracked` counter semantics. Source: Jobdori live dogfood, mengmotaHost, `5856913`, 2026-04-30.