feat: set auto-compact threshold to 165k tokens
Compact earlier to preserve more context fidelity before the window fills. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -449,7 +449,6 @@ async function runQuery(
|
||||
append: globalClaudeMd,
|
||||
}
|
||||
: undefined,
|
||||
model: 'sonnet[1m]',
|
||||
allowedTools: [
|
||||
'Bash',
|
||||
'Read',
|
||||
@@ -626,7 +625,7 @@ async function main(): Promise<void> {
|
||||
// No real secrets exist in the container environment.
|
||||
const sdkEnv: Record<string, string | undefined> = {
|
||||
...process.env,
|
||||
CLAUDE_CODE_AUTO_COMPACT_WINDOW: '200000',
|
||||
CLAUDE_CODE_AUTO_COMPACT_WINDOW: '165000',
|
||||
};
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -149,15 +149,11 @@ function createSchema(database: Database.Database): void {
|
||||
|
||||
// Add reply context columns if they don't exist (migration for existing DBs)
|
||||
try {
|
||||
database.exec(
|
||||
`ALTER TABLE messages ADD COLUMN reply_to_message_id TEXT`,
|
||||
);
|
||||
database.exec(`ALTER TABLE messages ADD COLUMN reply_to_message_id TEXT`);
|
||||
database.exec(
|
||||
`ALTER TABLE messages ADD COLUMN reply_to_message_content TEXT`,
|
||||
);
|
||||
database.exec(
|
||||
`ALTER TABLE messages ADD COLUMN reply_to_sender_name TEXT`,
|
||||
);
|
||||
database.exec(`ALTER TABLE messages ADD COLUMN reply_to_sender_name TEXT`);
|
||||
} catch {
|
||||
/* columns already exist */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user