Repository navigation
1.92.0 / build 185
Requested by Brad: a measurement of four weeks of his Claude Code use found that long conversations, not the models' own writing, used most of his plan (65% of the cost came from requests made after a conversation passed 200K tokens), and that subagents ran on the same model as the conversation that started them. He asked for a context limit and a subagent policy in Pocket itself, for every agent, with a choice of how and when to compact. This release is phase 1 of the spec.
- Policy.
context-policy.mjschecks and readscontextPolicy(compaction.modeagent|limit,compaction.limit50K–1M;workers.modeldefault|tier-down;workers.effort) and turns it into each engine's launch options. The default changes nothing, and saving the default storesnull. - Claude Code.
spawnRunneraddsenvto--settings:CLAUDE_CODE_AUTO_COMPACT_WINDOW,CLAUDE_CODE_SUBAGENT_MODEL(opusunder Fable or Mythos,sonnetunder Opus) andCLAUDE_CODE_SUBAGENT_EFFORT.--settingsoutranks~/.claude/settings.jsonenv; this was verified on 2.1.316 (a 150K window in/context, and a subagent on Sonnet 5.5 at low effort while settings.json saidopus). The leader is the turn's model, then Pocket's default, then the CLI's. Runner markers recordpolicyKey, and a reused process whose policy changed is replaced (context policy changed) unless it is running background jobs. - Codex.
thread/start,thread/resumeandthread/forkcarryconfig:model_auto_compact_token_limit(85% of the limit),agents.default_subagent_model(the newest GPT Sol under GPT Astra,codexNewestSol) andagents.default_subagent_reasoning_effort. The leader is the turn's model, elseconfig.toml'smodel(codexDefaultModel). A session opened with another policy is reopened. This was verified on 0.166.0: a sub-agent with no model rangpt-6.1-solatlow. - Engines. The
contextPolicyfeature is true for Claude and Codex and false for OpenRouter: OpenCode's compaction has no token limit, so that comes in phase 2. - Settings. Agents & instance → Context and subagents: Compact conversations, Subagent model, Subagent effort, and a note saying which agents it applies to. Saving restarts idle processes.
- Tests:
context-policy.test.mjs(defaults, tiers, launch options, validation; over HTTP, the settings round trip, the Claude--settingsenv before and after a change, a Fable leader, a Codex default leader fromconfig.toml, and clearing).fake-clauderecordssettingsEnv, andfake-codexrecords each thread'sconfigandmodel.