Sessions
The commands that open, reattach to and close the directory your agent works in — and the guard that decides what it can write.
Everything you do with ivar happens inside a session. You start one from your
harness with a slash command; ivar assembles the view directory and the agent
runs in it.
Start a session
/ivar-session-start [feature-name]Name a feature and you get a feature session: its promoted repos mounted at the view directory's root, all on the feature's branch, writable.
Leave the name off and you get a discovery session: no feature bound, every repo read-only on its default branch. That is the one to open when you are still working out what the change even is — see Discovery.
What the agent sees
Repos sit at the root — not under a repos/ level — so a path is
api/openapi.json, and a write-contract glob is <repo>/src/**. The harness
config directory carries the hall's skills and the session's bootstrap
instructions, and plans/<feature>/ is the feature's planning artifacts
projected in from the hall.
The session exports three keys that everything else keys off:
IVAR_SESSION_ID=<uuid>
IVAR_FEATURE=<feature-or-empty>
IVAR_SESSION_PATH=<absolute-view-dir>The guard
Repos you have not promoted have their write bits cleared — mode & ~0o222,
applied recursively. The kernel refuses the write.
chmod, not a prompt
Asking an agent not to touch shared works until it does not. A cleared write
bit does not depend on the model's cooperation. When the agent hits one, the
harness hook explains how to promote the repo — it does not argue.
Lifting the guard is one command, covered in Features.
Reattach after a restart
/ivar-session-connect [session-id-prefix]Reconnect re-materialises the view directory and repairs whatever drifted: repo symlinks, the read-only guards, the provider's config directory, the projected plan link.
Reconnect, do not restart
If a session already exists for your feature, connect to it. Starting a second one for the same feature leaves you with two view directories over the same worktrees.
Both start and connect emit the same three binding keys, so it does not
matter which one got you there.
Close it
/ivar-session-stopTears the view directory down, ends the harness and cleans up the guards.