NAME
Acme::Claude::Shell::Session - Multi-turn session for Acme::Claude::Shell
SYNOPSIS
use Acme::Claude::Shell::Session;
use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $session = Acme::Claude::Shell::Session->new(
loop => $loop,
dry_run => 0,
safe_mode => 1,
);
$session->run->get;
DESCRIPTION
Runs an interactive REPL on one Claude::Agent::Client session, so Claude remembers context from previous commands: you can say "now compress those files" after a find command. Every shell operation goes through the execute_command tool, which asks for approval before running anything, and the command's output is printed as it comes back.
ATTRIBUTES
loop
The IO::Async::Loop to run on. Required.
dry_run
Preview mode: Claude::Agent's dry-run hooks block file-modifying built-in tools. Default 0.
safe_mode
Ask for extra confirmation before dangerous commands. Default 1.
working_dir
Starting directory for commands. Default ..
colorful
Use colored output, spinners and menus. Default 1.
verbose
Log every tool call and notification through the hooks. Default 0.
audit_log
Record every tool call in _audit_log. Default 0.
model
Claude model to use. Optional.
effort
Effort level: low, medium, high, xhigh or max. Optional.
_client, _history, _spinner, _session_start, _tool_count, _tool_errors, _audit_log
State the tools and hooks read and write: the Claude::Agent::Client, the commands run this session, the active spinner, and the statistics the Stop hook reports.
METHODS
new
Takes a flat list of name/value pairs. Unknown names are ignored.
options
my $options = $session->options;
The Claude::Agent::Options for the session: the in-process shell tools server, the safety hooks, the system prompt, and the model and effort when set. The CLI's built-in tools are turned off, so every command goes through execute_command and its approval menu.
run
$session->run->get;
Run the REPL until exit, quit or end of input. Returns a Future.
BUILT-IN COMMANDS
help- Show help messagehistory- Select and re-run previous commandsclear- Clear the screenexit/quit- Exit the shell
HISTORY
Command history is persisted to ~/.acme_claude_shell_history and loaded on startup. Maximum 1000 lines are kept.
AUTHOR
LNATION, <email at lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)