Skip to main content
Session hooks give an AI coding agent ambient awareness of your Fjall deployment state at the start of each session.

What session hooks do

When you work with an AI coding agent (Claude Code, Codex, Cursor, GitHub Copilot), the agent makes better decisions when it knows your deployment context: which organisation, applications, and AWS accounts you are working with. A session hook injects that context automatically when an agent session starts. Instead of the agent running fjall status itself, the hook runs a lightweight status check and supplies the result as ambient context.

Install hooks

Hooks are not installed automatically. Run the installer once:
The installer writes a hook entry into each detected agent configuration file: Each hook runs fjall status --agent --budget minimal, which outputs a compact summary of your deployment state in roughly 50 tokens.

What the hook provides

This gives the agent enough context to make informed decisions without consuming your token budget.

Installer output

On success, the installer prints the files it wrote and how to manage the hooks:

Opting out

Temporary (single invocation)

Set the environment variable before running a command:
While FJALL_DISABLE_HOOKS=1 is set, fjall agent install-hooks skips installation.

Permanent (survives upgrades)

This command:
  1. Removes Fjall session hooks from all detected agent configuration files.
  2. Writes a ~/.fjall/hook-opt-out sentinel file.
  3. Stops future installs while the sentinel exists.

Re-enabling after opt-out

The --force-install flag removes the opt-out sentinel and installs fresh hooks.

Idempotency and updates

Security considerations

Next Steps

Agent Mode

Use Fjall from AI coding agents with structured TOON output.

Log In

Authenticate the Fjall CLI before running agent commands.

Connect AWS

Connect an AWS account so the CLI has deployment context to inject.