CLIO icon indicating copy to clipboard operation
CLIO copied to clipboard

Errors in USER_GUIDE.md

Open dnv opened this issue 3 months ago • 6 comments

Looking at https://github.com/SyntheticAutonomicMind/CLIO/blob/main/docs/USER_GUIDE.md and see 2 immideate issues:

"Ctrl+C - Cancel current AI response" - Ctrl-C actually exits Clio entirely. I was looking for a way to cancel current work without exiting the session entirely and am yet to find it :)

"alias cd='clio --debug' # Debug mode" suggesting people override the default linux command for changing directories with this seems an odd recommendation.

dnv avatar Aug 06 '26 15:08 dnv

Automated Triage Summary

Field Value
Classification bug
Priority low
Completeness 95%

Analysis: Two documentation errors in docs/USER_GUIDE.md:

  1. Line 2494 'Ctrl+C - Cancel current AI response' is wrong. Ctrl+C is wired to $SIG{INT} in clio (line 1419) and runs cleanup_handler which saves the session and exits 0. ReadLine.pm also forwards Ctrl-C into SIGINT. The actual cancel-response key is ESC, which the CLIO::Core::Interrupt module detects via the ALRM timer and surfaces through WorkflowOrchestrator._handle_interrupt() as an interact prompt without exiting the session.

  2. Line 2503 alias cd='clio --debug' shadows the POSIX cd builtin and breaks directory navigation in any shell that sources it. Even if the author meant a 'clio debug' shorthand, cd is the wrong name to overwrite.

Recommended fixes (docs only, no code change):

  • Change line 2494 to: ESC - Cancel current AI response (Ctrl+C exits CLIO). Update line 263's 'Ctrl+D or Ctrl+C | Exit CLIO' row if more clarification is desired.
  • Replace the alias cd='clio --debug' line with a non-shadowing name (e.g. alias cld='clio --debug') or drop it entirely.

Confidence: high — both claims were verified against the source.

Root Cause Analysis

Confidence: high

Relevant files:

  • docs/USER_GUIDE.md

Two factual errors in docs/USER_GUIDE.md:

  1. Line 2494 says 'Ctrl+C - Cancel current AI response', but the implementation actually treats Ctrl+C as a hard exit. In clio line 1419, $SIG{INT} = $cleanup_handler; is wired to save the session and exit 0. ReadLine.pm lines 429-438 catches Ctrl-C at the input prompt and re-raises SIGINT via kill 'INT', $$ to trigger that handler. The actual 'cancel current AI response' key is ESC, handled by CLIO::Core::Interrupt.pm (ALRM-based ESC/Ctrl+C scanner) which sets the session's user_interrupted flag, polled by WorkflowOrchestrator._handle_interrupt() to surface an interact prompt and stop in-flight work without exiting.

  2. Line 2503 recommends alias cd='clio --debug', which shadows the POSIX shell cd builtin. The alias applies in interactive shells (not inside a clio session), so any user who adds this and later tries to change directories will get clio instead of cd. The intent was probably a 'clio debug' shortcut, but cd is a poor choice for the alias name.

Both are documentation bugs; no code change required to fix.

Affected Areas

  • docs/USER_GUIDE.md

This is an automated analysis. A maintainer will review shortly.

CLIO-Bot avatar Aug 06 '26 15:08 CLIO-Bot

ESC isn't cancelling current work either, at least not over Putty.

dnv avatar Aug 06 '26 15:08 dnv

It may not cancel immediately, when the agent is running tools it might take a turn or two for it to catch the signal. The alternative is control-c which is an immediate stop and then you can resume the same conversation with --resume.

fewtarius avatar Aug 06 '26 16:08 fewtarius

From a usability POV, I think it would work best if Ctrl-C was an immideate break of current work without exiting session (Hermes does this instantly without waiting for turns) and Ctrl-D or some other to do a full exit.

dnv avatar Aug 06 '26 16:08 dnv

I use control-c often to break out of the whole session and then resume it after doing some local work. I'm not against changing this, would need to think of how to implement it while keeping my flow. :)

fewtarius avatar Aug 06 '26 16:08 fewtarius

The docs are updated, I don't think I'll do more with this one because I'm really happy with the flow - escape to interrupt, control-c to save and exit.

fewtarius avatar Aug 08 '26 11:08 fewtarius