Who it is forAn engineer running agent sessions unattended, such as scheduled or batch jobs, where nobody reads a hint and no one can confirm auto mode.
The problemHints and automatic compaction are aimed at a person, so unattended sessions can waste TypeSafe requests or compact at a point no one reviews.
The outcomeThe adviser stays inert in that session: no TypeSafe request, no hint, no automatic compaction, and no command, even if a mode was saved.
What you need first
- Node 22 or newer (22.18 or newer for Codex and Grok)
- One supported host: Pi 0.82.0 or newer, Claude Code 2.1.274 or newer, Codex CLI 0.153.0 or newer, or Grok Build 1.0.34 or newer
- A TypeSafe API key, supplied as TYPESAFE_API_KEY in the launch environment, a cwd .env file, or saved through the host settings where supported
Steps
- Export
COMPACT_ADVISER_DISABLE=1in the shell or job configuration that starts the unattended agent session. - Confirm the variable is set in that environment with
echo $COMPACT_ADVISER_DISABLEbefore the job starts. (inferred, check the README) - Start the agent session from that same environment.
- Keep the variable set for the whole run, since it wins over any saved hint or auto mode.
Prompt for your agent
For the unattended agent job on <target host>, export COMPACT_ADVISER_DISABLE=1 in the job environment before launching the session. Expected output: the echoed variable value is 1 and the session produces no compact-adviser hints. Verify the value is 1 before the session starts.
Caveat. The variable only switches the adviser off, so it does not change how the host decides when to compact on its own.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page