Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

feat: #156 — error classification for text-mode output (Phase 2 of #77)

YeonGyu-Kimf1e4ad757484
diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs
index bed1686d..c4ba812a 100644
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@ -223,14 +223,21 @@ fn main() {
"hint": hint,
})
);
- } else if message.contains("`claw --help`") {
- eprintln!("error: {message}");
} else {
- eprintln!(
- "error: {message}
+ // #156: Add machine-readable error kind to text output so stderr observers
+ // don't need to regex-scrape the prose.
+ let kind = classify_error_kind(&message);
+ if message.contains("`claw --help`") {
+ eprintln!("[error-kind: {kind}]
+error: {message}");
+ } else {
+ eprintln!(
+ "[error-kind: {kind}]
+error: {message}
Run `claw --help` for usage."
- );
+ );
+ }
}
std::process::exit(1);
}