You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Claude "Auto-compact after" has no effect when CLAUDE_CODE_AUTO_COMPACT_WINDOW is set #35725
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Set Settings → Providers → Claude → "Auto-compact after" to 400000.
Add "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000" to the env block of ~/.claude/settings.json.
Start a Claude thread on a 1M-context model and keep working past 400k tokens.
Expected behavior
Claude compacts at the window set in "Auto-compact after", where the context meter draws its compaction tick (about 367,000 tokens).
Actual behavior
Claude ignores the T3 setting and uses the variable instead. The thread grew to 818k / 1m without compacting, while the meter kept its tick at about 367k, so compaction looks overdue or broken. Nothing shows that the setting has no effect.
T3 sends the setting as --settings {"autoCompactWindow":400000,...}, but Claude Code prefers CLAUDE_CODE_AUTO_COMPACT_WINDOW over autoCompactWindow. With the variable set, /autocompact 400k is refused with "CLAUDE_CODE_AUTO_COMPACT_WINDOW is set and takes precedence. Unset it to change this setting."
Impact
Minor bug or occasional failure
Version or commit
T3 Code desktop 0.1.9 (.deb); still in the code on main @ 587deab
Environment
Ubuntu 26.04, Claude Code 2.1.322, Claude Opus 5.5 (1M window)
Claude Code applies env from --settings above the settings files, so T3 can make its setting take effect by also sending it as CLAUDE_CODE_AUTO_COMPACT_WINDOW in that env, as it already does for ENABLE_TOOL_SEARCH. Checked with Claude Code 2.1.323: with the variable at 1000000 in a project .claude/settings.json, adding --settings '{"env":{"CLAUDE_CODE_AUTO_COMPACT_WINDOW":"400000"}}' makes /autocompact report 400k tokens (from CLAUDE_CODE_AUTO_COMPACT_WINDOW).
Workaround
Remove the variable from settings.json. New sessions then use the T3 setting.
Activity