mirror of
https://github.com/instructkr/claude-code.git
synced 2026-06-05 20:06:43 +00:00
Compare commits
1 Commits
docs/roadm
...
e95b01be0b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e95b01be0b |
@@ -6282,3 +6282,5 @@ 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`.
|
||||
342. **Resume-safe `/commands --output-format json` is rejected as an unknown slash command even though the error points users at `/help` for slash-command discovery, leaving no structured command-index alias** — dogfooded 2026-04-29 for the 16:30 nudge on current `origin/main` / rebuilt `./rust/target/debug/claw` with embedded `git_sha` `f65b2b4f`. Running `./rust/target/debug/claw --resume latest /commands --output-format json` wrote no stdout bytes and emitted only stderr JSON: `{"command":"/commands","error":"Unknown slash command: /commands\n Help /help lists available slash commands","type":"error"}`. In the same rebuilt binary, `./rust/target/debug/claw --resume latest /help --output-format json` succeeded on stdout but exposed only prose keys `kind,text`. The discoverability path therefore has two gaps at once: the intuitive `/commands` index/alias is unavailable, and the fallback suggestion is buried inside an error string rather than surfaced as structured `suggested_command` / `discovery_command` metadata. This is distinct from #340 and #341: the pinpoint is not merely stderr-only JSON error placement, but the absence of a machine-readable slash-command discovery alias/index and typed correction guidance when users or claws try the natural `/commands` form. **Required fix shape:** (a) either implement `/commands` as a resume-safe alias for slash-command discovery or return a typed `unknown_command` JSON envelope with `suggested_command:"/help"` and `discovery_command:"/help"` fields; (b) make the primary JSON error envelope follow the stdout JSON contract and single-discriminator schema from #340/#341; (c) expose structured slash-command inventory from the discovery surface rather than requiring callers to scrape `text`; (d) add regression coverage proving `/commands --output-format json` either returns the structured command inventory or returns a structured correction that automation can follow without parsing prose. **Why this matters:** claws need a predictable way to discover valid slash commands before invoking them. If the natural command-index spelling fails with stderr-only JSON and a human-formatted hint, orchestration has to guess, parse prose, and special-case command discovery before it can even learn the supported command surface. Source: gaebal-gajae dogfood follow-up for the 16:30 nudge on rebuilt `./rust/target/debug/claw` `f65b2b4f`.
|
||||
|
||||
348. **`/history --output-format json` entry objects omit `role` field; entries include only `text` and `timestamp_ms`, making it impossible to distinguish user messages from assistant messages programmatically** — dogfooded 2026-04-30 by Jobdori on `a1bfcd4`. Running `/history --output-format json` returns `{"kind":"history","total":N,"showing":N,"entries":[{"text":"...","timestamp_ms":...},...]}`. Each entry has only two fields: `text` and `timestamp_ms`. There is no `role` (`"user"` / `"assistant"` / `"tool"`), no `entry_index`, no `message_id`, and no indication of which turn the entry belongs to. An orchestration layer replaying history or searching for the last user prompt cannot distinguish a user instruction from an assistant response without pattern matching on the text content. Side-finding: the `showing` and `total` fields exist but there is no pagination parameter (no `--limit`, `--offset`, or `--from-ms`) to page through more than the default window. **Required fix shape:** (a) add `"role": "user" | "assistant" | "tool"` to each history entry; (b) add `"entry_index"` (0-based position in the full conversation) for deterministic replay; (c) add `--limit` and `--offset` or `--from-ms` parameters to `/history` so callers can page through long conversations without loading all entries; (d) update the JSON schema in SCHEMAS.md. Source: Jobdori live dogfood, mengmotaHost, `a1bfcd4`, 2026-04-30.
|
||||
|
||||
Reference in New Issue
Block a user