Skip to content

feat(cli): carry a session-start hook's context to the model on OpenCode, Kilo and Antigravity #1348

Done

Description

@blafourcade

Problem

A SessionStart hook that informs the model reaches nothing on three hosts, and the docs say at least two of them could carry it:

  • OpenCode and Kilo: the generated bridge runs the hook with its output ignored (opencode-hooks-bridge.model.ts, kilo-hooks-bridge.model.ts, stdio ignore). Kilo documents experimental.chat.system.transform ("Modify the system prompt array"); OpenCode V2 documents ctx.session.instructions.entry.put(...) (server plugins). Whether the V1 plugin API the bridge targets has an equivalent is not verified.
  • Antigravity: host-antigravity.cjs answers nothing at SessionStart, yet the hooks doc gives an optional injectSteps output with a systemMessage "out-of-band system instruction for the agent". The captured SessionStart run only logged, so injection was never tried.

Proposed solution

Probe each host in a sandbox (throwaway HOME and project, free model, chats deleted): does a session-start context reach the model? Wire what the probe proves; state the rest as a limit in docs/COMPATIBILITY.md.

Acceptance criteria

  • One probe per host, recording version, invocation and whether the model saw the text.
  • Each proven path wired and tested from a captured payload.
  • Each unproven path stated as a limit.

Content type

CLI

Activity

  1. blafourcade commented on Nov 25, 2026

    @blafourcade
    ContributorAuthor

    Addition from the raw docs: Antigravity's PreInvocation hook "fires before the model is called" and its injectSteps can carry a systemMessage, so a session-start context could also be injected at the first PreInvocation. The probe should try both paths.

  2. blafourcade commented on Nov 26, 2026

    @blafourcade
    ContributorAuthor

    Delivered on next: #1353 carries a SessionStart context to the model on Antigravity (injectSteps systemMessage), and #1378 on OpenCode and Kilo, V1 and V2.

  3. moved this from Ideation to Done in AIDD Roadmapon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions