Is anyone successfully injecting context *silently* into the context window? #34
Replies: 2 comments
|
I've not got it to work with StartSession. I'm using User_Submit. |
0 replies
|
I wasn't able to get SessionStart to work silently either - the context always appears in the transcript. Current best practice: Use the PAI skill ( The skill approach:
Alternatively, you can use a separate Memory skill that loads context on-demand rather than pre-injecting it. This keeps the transcript completely clean until you actually reference the context. The SessionStart hook approach for silent injection doesn't seem to be supported in the current Claude Code architecture. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey folks, quick question about SessionStart hooks. The docs say we can preload context without cluttering the chat in two ways:
2.Just write the context to stdout (exit code 0) and Claude will pull it in automatically.
That sounds ideal, but in practice I haven’t been able to make either path “silent.” Whether I write to stdout or send the JSON payload with suppressOutput: true, Claude still echoes the entire block right at the top of the session. It’s great that the agent gets it, but the transcript noise defeats the purpose.
Has anyone actually gotten a SessionStart hook to hydrate context without showing the payload in the conversation pane? If so, what am I missing—different field, newer schema, alternate hook event? Would love to hear what’s working for you.
Thanks
All reactions