agent logging: single log file, --debug prints to stdout
Consolidate agent logging to one file per run in llm-logs/{agent}/.
Prompt written before LLM call, response appended after. --debug
additionally prints the same content to stdout.
Remove duplicate eprintln! calls and AgentResult.prompt field.
Kill experience_mine and fact_mine job functions from daemon —
observation.agent handles all transcript mining.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d7436b8b9c
commit
03310dafa4
3 changed files with 27 additions and 60 deletions
|
|
@ -13,20 +13,13 @@ pub fn cmd_run_agent(agent: &str, count: usize, dry_run: bool, debug: bool) -> R
|
|||
let log = |msg: &str| eprintln!("[{}] {}", agent, msg);
|
||||
|
||||
if debug {
|
||||
// Debug mode: show prompt, call LLM, show response — don't apply
|
||||
let result = crate::agents::knowledge::run_one_agent(
|
||||
&mut store, agent, count, "test", &log,
|
||||
crate::agents::knowledge::run_one_agent(
|
||||
&mut store, agent, count, "test", &log, true,
|
||||
)?;
|
||||
eprintln!("\n=== PROMPT ({} bytes) ===\n", result.prompt.len());
|
||||
println!("{}", result.prompt);
|
||||
eprintln!("\n=== RESPONSE ({} bytes) ===\n", result.output.len());
|
||||
println!("{}", result.output);
|
||||
eprintln!("\n=== PARSED: {} actions, {} no-ops ===", result.actions.len(), result.no_ops);
|
||||
} else {
|
||||
let (total, applied) = crate::agents::knowledge::run_and_apply_with_log(
|
||||
crate::agents::knowledge::run_and_apply_with_log(
|
||||
&mut store, agent, count, "test", &log,
|
||||
)?;
|
||||
eprintln!("[{}] {} actions, {} applied", agent, total, applied);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue