diff --git a/AGENTS.md b/AGENTS.md index b0184c1ba..9dab6d6e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -204,14 +204,6 @@ Verified against the current tree; sources in parentheses. typically the distribution shim (`~/.minimal/shim/bin/minimal`), distinct from anything this repo builds (justfile comments, `crates/minvmd/README.md`). -- **`min session attach -c` is not a general remote shell.** The daemon's exec - handler accepts only `min run `, `min package build [args...]`, and - `min check [args...]` (plus the internal `git-receive-pack min://` path); - anything else fails the channel. Task - execs inherit the session's no-net/host-net mode, but an own-IP session's - task exec currently falls back to host networking; use an interactive - attach when the session's network identity matters - (`crates/minimald/src/exec.rs`). ## CI lane map diff --git a/crates/minimal/src/lib.rs b/crates/minimal/src/lib.rs index 1e3463304..0e486ffca 100644 --- a/crates/minimal/src/lib.rs +++ b/crates/minimal/src/lib.rs @@ -446,7 +446,7 @@ pub struct AttachArgs { #[arg(add = completion::session_completer())] pub session: Option, /// Command to exec in the session context (non-interactive) - #[arg(long, short)] + #[arg(long, short, hide = true)] pub command: Option, } @@ -1797,8 +1797,7 @@ fn ensure_interactive_attach_tty(stdin_is_tty: bool) -> Result<(), anyhow::Error } else { bail!( "`min session attach` needs an interactive terminal, but stdin is not a TTY. \ - Run it from a terminal, or use `min session attach --command ` to run a \ - single command non-interactively." + Run it from a terminal." ) } } @@ -2695,7 +2694,7 @@ mod tests { .unwrap_err() .to_string(); assert!( - err.contains("not a TTY") && err.contains("--command"), + err.contains("not a TTY"), "expected an actionable non-TTY error, got: {err}" ); ensure_interactive_attach_tty(true).expect("a real terminal must pass the guard"); diff --git a/docs/concepts/sessions.md b/docs/concepts/sessions.md index 07b927119..44f255067 100644 --- a/docs/concepts/sessions.md +++ b/docs/concepts/sessions.md @@ -114,14 +114,6 @@ background, and `min session attach` rejoins it later. Changes you make inside s the session's workspace; bring them back to the host by pushing them out with `git push min://`. -To run a declared task non-interactively instead of opening a shell, pass -`--command` (short `-c`). The command channel accepts only `min run ` -invocations; arbitrary commands need an interactive shell: - -```console -$ min session attach my-session -c 'min run test' -``` - ## How a session is composed A session's contents are not hand-configured. They are **composed** from diff --git a/docs/guide/agents.md b/docs/guide/agents.md index b86c33714..1392e288b 100644 --- a/docs/guide/agents.md +++ b/docs/guide/agents.md @@ -24,7 +24,7 @@ $ claude Claude Code launches inside the session with your project's source code and a read-only system containing the `claude-code` binary and core utilities from `base`. The session has no additional access to anything on your host system unless you explicitly declare it. -Note that sessions are driven interactively: attaching needs a terminal, and the non-interactive `min session attach -c` channel accepts only `min run ` invocations. Launch the agent from inside an attached shell as shown above, rather than scripting it from the host. +Note that sessions are driven interactively: attaching needs a terminal. Launch the agent from inside an attached shell as shown above, rather than scripting it from the host. ## Adding more tools diff --git a/docs/reference/cli-min.md b/docs/reference/cli-min.md index bfa4910a5..ff62e8dd5 100644 --- a/docs/reference/cli-min.md +++ b/docs/reference/cli-min.md @@ -73,16 +73,13 @@ the current directory). ### `session attach` ``` -min session attach [-c ] [SESSION] +min session attach [SESSION] ``` Attaches to an existing session, identified by UUID or session name. When `SESSION` is omitted, `min session attach` resolves a session from the current working directory (or the only existing session) and opens an interactive picker if the choice is ambiguous (`--no-input` errors instead). -`-c/--command` execs a command in the session context non-interactively -instead of opening an interactive shell; the daemon accepts only -`min run ` invocations on this channel, not arbitrary commands. ### `session destroy`